LML
LML

Reputation: 1667

Storyboard did not loading automatically

I had an universal app for ipad and iphone and it wasn't using any storyboards. But recently I had moved all my xib files into storyboards. I have referenced all the outlet and action connection to the storyboard view controller also.

I have set the MainStoryBoradBasename(iPad) and iphone also in the info tab of the app in xcode 5

Then I deleted my code in didFinishLaunchingWithOptions: in appdelegate but it shows blank screen.All tutorials say there is no need no specify the rootviewcontroller while using storyboard (Note : I have also set my isinitialviewcontroller in storyboard by checking it). But if I set window.rootviewcontroller to my initial view controller in stroyboard on didFinishLaunchingWithOptions everything work perfectly and when I removed it it shows blank screen.Is there any additional setting needed in xcode 5??

Upvotes: 1

Views: 3721

Answers (1)

Rithesh Rao
Rithesh Rao

Reputation: 1250

Few key points to be followed while developing iOS app with Storyboard

Considering Main_iPhone.storyboard and Main_iPad.storyboard are the two storyboard files for iPhone and iPad respectively.

  1. In '-*info.plist' set property as below,
    Main storyboard file base name = Main_iPhone
    Main storyboard file base name (iPad) = Main_iPad

  2. Under Project Setting,
    Choose target (App)> General > Deployment Info > iPhone : Main Interface = Main_iPhone
    Choose target (App)> General > Deployment Info > iPad : Main Interface = Main_iPad

  3. In the Storyboard, set (checkbox) *Is Initial View Controller = YES * in controller which is supposed to be presented as FirstViewController/RootViewController.

Upvotes: 10

Related Questions