[英]nib to storyboard
I am using Apple's app calculator but I need to put it into a storyboard
not in a xib
file. 我正在使用Apple的应用程序计算器,但需要将其放入
storyboard
xib
而不是xib
文件中。 Can some one walk me through how to change it? 有人可以指导我进行更改吗?
The code from apples app is as follows: apples应用程序中的代码如下:
- (void) applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after application launch
CalcViewController *_calcViewController = [[CalcViewController alloc] initWithNibName:@"CalcView" bundle:[NSBundle mainBundle]];
self.calcViewController = _calcViewController;
[window addSubview:[calcViewCont``roller view]];
[window makeKeyAndVisible];
}
The storyboard
I want to place it into is called SecondViewController
. 我想要放置的
storyboard
SecondViewController
称为SecondViewController
。
Can some one help? 可以帮忙吗? Thanks
谢谢
In the Project Navigator click on your project name, then select your app Target, now add your storyboard name as Main Storyboard, make sure Main Interface is blank. 在项目浏览器中,单击项目名称,然后选择应用程序目标,现在将您的情节提要名称添加为“主情节提要”,并确保“主界面”为空白。
Now in applicationDidFinishLaunching
just remove everything you have there in that method. 现在,在
applicationDidFinishLaunching
只需删除该方法中的所有内容即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.