For example, I’ve pushed view controller then, pushed another one, then popped, then another 3 pushes and 1 pop.
How can I see resulting view controllers “stack”?
And how can I see which view controller will appear when I press “back button” on top bar?
For example, I’ve pushed view controller then, pushed another one, then popped, then another
Share
The
UINavigationControllerexposes the ‘stack’ of view controllers via theViewControllersarray property. See the following documentation:http://iosapi.xamarin.com/?link=P%3aMonoTouch.UIKit.UINavigationController.ViewControllers
To find the view controller that will be navigated to, just take the last element from this array.