1. 从xib的viewcontroll中启动storyboard 或者 从一个storyboard切换到另一个storyboard:
[objc]
– (IBAction)openStoryboard:(id)sender {
UIStoryboard *secondStoryboard = [UIStoryboard storyboardWithName:@"SecondStoryboard" bundle:nil];
[self presentModalViewController:[secondStoryboard instantiateInitialViewController] animated:YES];
}
[/objc]
2. 从storyboard切换到xib:
[objc]
LoginViewController *loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
[/objc]
然后用push或者modal方法启用这个controller
3. 从xib或者storyboard中启动里一个storyboard的某一个controller上:
[objc]
[storyboard instantiateViewControllerWithIdentifier"actionList"];
[/objc]
时间: 2024-10-28 17:21:11