[英]Segue from Storyboard to XIB
I have a storyboard View Controller, which is the first screen in my app. 我有一个故事板视图控制器,这是我的应用程序中的第一个屏幕。 The rest of the app is designed with xib's.
该应用程序的其余部分使用xib设计。 I want to segue from a button in the storyboard's VC to a XIB file.
我想从故事板的VC中的按钮到XIB文件。 I know how to do this from a xib to storyboard, but how about this ?
我知道如何从xib到storyboard这样做,但是这个怎么样?
Thanks in advance ! 提前致谢 !
From xib to storyboard 从xib到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 从storyboard到xib
YourViewController *viewController=[[YourViewController alloc]initWithNibName:@"ViewControllerName" bundle:nil];
[self presentViewController:viewController animated:YES completion:nil];
In case of NavigatinController 在NavigatinController的情况下
[self.navigationController pushViewController:viewController animated:YES];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.