简体   繁体   English

笔尖到情节提要

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM