简体   繁体   中英

iOS7 How can I step aside from Navigation Control?

Brief Explanation:

View 1(Navigation Controlled) has a "add new object" button A.

When click button A, it will move to View 2 (Navigation controlled and has back to view 1 button on the top with "< View 1")

View 2 has a "Save object" button B, which I will add a new object into View 1's NSMutableArray. However, when I click button B, it will go to View 1 with "< View 2" back button on the top of navigation bar even though it's the root navigation view.

On storyboard, button A and B action is as push.

Question

How can I get out of this navigation movement? Is there a way I can direct to button B action to a certain view? Without navigation back bar automatically added on top?

查看1

视图2

再次查看1

The action for button B shouldn't be a push since you want to go back to the first controller. When you want to go back to the previous controller, you either should use the default back button in the navigation bar, or if you have a custom button, you should have popViewControllerAnimated: as its action.

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