MonoTouch PopToViewController
Does anyone have an example for NavigationController.开发者_高级运维PopToViewContoller();
using MonoTouch/Xamarin?
To go back to the last ViewController:
this.NavigationController.PopViewControllerAnimated(true);
To go to the Root View Controller
this.NavigationController.PopToRootViewController(true);
To go to a new viewController do this:
this.NavigationController.PopToViewController( MyNewViewController, true);
First the view controller you want to pop to, needs to be in the navigation stack, so you must have pushed to it at some point previously in navigation.
[self.navigationController popViewControllerAnimated:YES];
精彩评论