Transferred from: http://www.cnblogs.com/anywherego/p/3542202.html
Below with Oldviewcontroller (OLDC) button btn Click to jump to Newviewcontroller (NEWC) as an example of the explanation:
segues mode of 1.Storyboard
Click the mouse button btn and then control-drag to Newc page, in the pop-up Segue page Select the Jump mode can be
Advantages: Easy to operate, no code generation, show logic clear in storyboard
Disadvantage: When the page is not easy to view, team cooperation can be poor maintenance, many people do not recommend the use of this method of cooperation
2. TAB Uitabbarcontroller Controller
Adding a child controller by calling the Addchildviewcontroller method of Uitabbarcontroller
Instance code:
Uitabbarcontroller *TABBARVC = [[Uitabbarcontrolleralloc] init];
Oldviewcontroller *OLDC = [[oldviewcontroller] init];
Oldc. Tabbaritem. title = @ "Controller 1";
Oldc. Tabbaritem. Image = [UIImageimagenamed: @ "Old.png"];
Newviewcontroller *NEWC = [[Newviewcontroller] init];
Newc. Tabbaritem. title = @ "Controller 2";
Newc.tabbaritem. Image = [UIImageimagenamed:@ "New.png"];
//Add child controllers (these sub-controllers are automatically added to the viewcontrollers array of Uitabbarcontroller)
[TABBARVC addchildviewcontroller:recent];
[TABBARVC addchildviewcontroller:friends];
Pros: Low Code volume
Cons: Tabbar iOS native style is not very good-looking, (not commonly used, currently not recommended), if you want to use, it is recommended to customize Tabbar
3. Navigation Controller Uinavigationcontroller
Called in the OLDC Btn's listener method:
[Self.navigationcontroller PUSHVIEWCONTROLLER:NEWC Animated:yes]; Skip to Next page
Called in the method of NEWC:
[Self.navigationcontroller Popviewcontrolleranimated:yes]; Back to previous page
When there are multiple jumps occurring and you want to return the root controller, call:
[self.navigationcontroller poptorootviewcontrolleranimated:YES]; Returns the root controller, which is the first page
4. Use modal form to display the controller
Called in OLDC:
[Selfpresentviewcontroller:newc animated:YES Completion:nil];
Called in NEWC:
[Selfdismissviewcontrolleranimated:YES Completion:nil];
5. Change the Rootviewcontroller of UIWindow directly
Summarize:
Storyboard method is suitable for personal development of small programs, team work or large projects are not recommended to use
Uitabbarcontroller because the native style of the system is not very beautiful at present, it is not recommended to use
The recommended use of Uinavigationcontroller and modal, no obvious disadvantage, and most of the current programs use both methods, just to see if you need to navigate the controller and determine which scheme to use
Overview of how to jump between iOS pages