IOS, xib和storyboard的混用

1. 从xib的viewcontroll中启动storyboard   或者   从一个storyboard切换到另一个storyboard:

- (IBAction)openStoryboard:(id)sender {  
    UIStoryboard *secondStoryboard = [UIStoryboard storyboardWithName:@"SecondStoryboard" bundle:nil];  
    [self presentModalViewController:[secondStoryboard instantiateInitialViewController] animated:YES];  
}

2. 从storyboard切换到xib:

LoginViewController *loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];  

然后用push或者modal方法启用这个controller


3. 从xib或者storyboard中启动里一个storyboard的某一个controller上:

[storyboard instantiateViewControllerWithIdentifier"actionList"]; 








你可能感兴趣的:(切换,xib,storyborad)