Marty
Marty

Reputation: 272

Moving project from XIB/NIB to Storyboards

I have a project that I originally started working on in Xcode 4. I then moved this project to Xcode 6. The project compiles and runs swimmingly. I then wanted to move this to use Storyboards.

Reading here and elsewhere I see people say they accomplished this by doing the following:

  1. Create storyboard
  2. Drag a viewcontroller onto the storyboard
  3. Click on the white of the viewcontroller
  4. Delete it Goto the original XIB and copy the entire view
  5. Paste that into the viewcontroller on the new storyboard
  6. Go into the appdelegate.m file and edit the didFinishLaunchingWithOptions section to look like this:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 
        return YES;
    }
    

No errors in my code. Builds fine but instead of seeing the new Storyboard / ViewController, I just see a black screen. Im sure I am missing something somewhere but I cannot seem to find what it is.

If you would like to see my code, I have it here: https://github.com/martylavender/LittleToDoApp/tree/Storyboards

Thanks

Upvotes: 0

Views: 2423

Answers (2)

Marty
Marty

Reputation: 272

I figured it out.

Looking at the build information of the project, I hadnt set the Main Interface to the MainStoryboard. That with the earlier suggestion fixed it!! Thanks!!!

Upvotes: 1

SeNeO
SeNeO

Reputation: 417

You need to set your first view controller as the initial view controller in your storyboard.

enter image description here

You just need to check the is initial View Controller line on the right panel

Upvotes: 2

Related Questions