开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜