开发者

MonoTouch PopToViewController

开发者 https://www.devze.com 2023-03-07 03:11 出处:网络
Does anyone have an example for NavigationController.开发者_高级运维PopToViewContoller(); using MonoTouch/Xamarin?To go back to the last ViewController:

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];

0

精彩评论

暂无评论...
验证码 换一张
取 消