Edit

Share via


UINavigationController.SetViewControllers(UIViewController[], Boolean) Method

Definition

Replaces the controllers in the navigation controller's navigation stack.

[Foundation.Export("setViewControllers:animated:")]
public virtual void SetViewControllers (UIKit.UIViewController[] controllers, bool animated);
abstract member SetViewControllers : UIKit.UIViewController[] * bool -> unit
override this.SetViewControllers : UIKit.UIViewController[] * bool -> unit

Parameters

controllers
UIViewController[]

The array of controllers to put into the navigation stack

This parameter can be null.

animated
Boolean

A boolean to control if the topmost controller's transition should be animated.

Attributes

Remarks

The last controller in the array will be placed at the top of the navigation stack.

Applies to