简体   繁体   中英

Change view with navigation controller

我有一个viewBased项目,有两个视图“ A”和“ B”,并在视图A上放置了一个按钮,并希望在用户按下按钮时显示视图B。我如何使用导航控件显示视图B(即通过按钮显示)使用下面的代码,但在此代码之前我不知道该怎么办(表示如何设置UINavigation控件,...)

[self.navigationController pushViewController:second animated:YES];

Just pop view B from the nav controller.

So when you press the button in view B just do this:

[self.navigationController popViewControllerAnimated:YES]

Here is a tutorial on how to set up a nav controller with three views and buttons to change. Navigation Controller Tutorial

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM