从storyboard跳到xib [Segue from Storyboard to XIB]

From xib to storyboard

UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
UIViewController *initViewController = [storyBoard instantiateInitialViewController];

then

[self.window setRootViewController:initViewController];

or

[self.navigationController pushViewController:initViewController animated:YES];

From storyboard to xib

YourViewController *viewController=[[YourViewController alloc]initWithNibName:@"ViewControllerName" bundle:nil];

[self presentViewController:viewController animated:YES completion:nil];

In case of NavigatinController

[self.navigationController pushViewController:viewController animated:YES];

你可能感兴趣的:(从storyboard跳到xib [Segue from Storyboard to XIB])