简体   繁体   中英

nib to storyboard

I am using Apple's app calculator but I need to put it into a storyboard not in a xib file. Can some one walk me through how to change it?

The code from apples app is as follows:

- (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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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