Storyboard, storyboard tutorial
I. Dynamic code rewriting
1. Generally, the main. storyboard is automatically executed when the program is started.
You can also rewrite it in AppDelegate.
-(BOOL) application :( UIApplication *) application didfinishlaunchingwitexceptions :( NSDictionary *) launchOptions
{
Self. window = [[[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds] autorelease];
// Override point for customization after application launch.
// Use Storyboard to initialize the Root Interface
// UIStoryboard * storyBoard = [UIStoryboard storyboardWithName: @ "MainStoryboard" bundle: nil];
// Self. window. rootViewController = [storyBoard instantiateInitialViewController];
2. Call storyboard in xib
-(IBAction) loginBtnClicked :( id) sender {
// Click the login button to switch to the storyboard interface.
UIStoryboard * storyboard = [UIStoryboard storyboardWithName: @ "MainStoryboard" bundle: nil];
// Self. view. window. rootViewController = [storyboard instantiateInitialViewController];
// [Self presentModalViewController: [storyboard instantiateInitialViewController] animated: YES];
[Self presentViewController: [storyboard instantiateInitialViewController] animated: YES completion: nil];
[Storyboard release];
}
3. storyboard calls storyboard
4.
Push segue
Is to press another View Controller Into the stack of the navigation controller. It is usually used with the navigation view controller.
The newly pushed View Controller has a rollback button, which can be returned to the previous layer.
Modal segue
Jump to vc
Use javasmseguewithidentifier to switch between ViewController
Http://luckfox.iteye.com/blog/1826416
Custom, rarely used
Refer:
Http://iaiai.iteye.com/blog/1493956 pity instance cannot download