IOS sdk6/xcode4.5 added a lot of new functions in storyboad for Visual Development page layout, navigation is more convenient, the following describes the implementation of various navigation.
1. You do not need to delete the default viewcontroller before xcode4, and then drag a navigation controller to implement navigation. Select the default viewcontroller and select Editor-embed in-
2. The simplest navigation method is next and back. You only need to press and hold the CTR to drag the line directly. It is best to enter the storyboard segue-Identifier value here.CodeUsed in
The Identifier value can be used in two places.
1. Page switching is convenient for value passing. How is the code?
2. If a page has a navigation path, you need to use the code to determine which target viewcontroller to navigate to, that is, which identifier to execute. The Code is as follows:
3. Custom navigation, which is provided by default, include push, modal, popover, replace, and custom. You can customize the class implementation.
The following code defines a back function Navigation:
4. return any viewcontroller, which is officially called unwind segues. If you want a viewcontroller to directly navigate back from any other viewcontroller, you only need to rewrite the following method under this viewcontroller:
As long as you have rewritten the-(ibaction) Name :( uistoryboardsegue *) segue in each viewcontroller, all your implementation methods will appear when you drag the line directly to the exit icon, if you select a method, the viewcontroller that implements this method is returned.
Basically, I hope it will be helpful for beginners.