Xcode: Storyboard change initial view controller

ios, storyboard, xcode

Solution

`topViewController`is a method of a `UINavigationController`. You app tries to call this method and since it is not there it crashed.

In your image your entry point arrow is still on the navigation controller:

Move it via drag&drop to your `safetyCultureMainVC`like this:

Problem

I started my app with the "master-detail" template. I simply added two other VCs and changed the "initial view controller" checkbox to "Safety Culture MainVC"...when I run, my app crashes... What do I need to do?! This is a screenshot of the default storyboard with my two other VCs thrown in--they work when the "Navigation Controller" is the default. Clearly, I'm a beginner, so as much detail as you can give me is helpful!! Thanks! Debug Output: 2012-06-07 10:38:42.812 SafetyCulture[1020:fb03] -[safetyCultureMainVC topViewController]: unrecognized selector sent to instance 0x6b7c210 2012-06-07 10:38:42.840 SafetyCulture[1020:fb03] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[safetyCultureMainVC topViewController]: unrecognized selector sent to instance 0x6b7c210' * First throw call stack: (0x16ae022 0x183fcd6 0x16afcbd 0x1614ed0 0x1614cb2 0x2619 0x17386 0x18274 0x27183 0x27c38 0x1b634 0x1598ef5 0x1682195 0x15e6ff2 0x15e58da 0x15e4d84 0x15e4c9b 0x17c65 0x19626 0x22ed 0x2255) terminate called throwing an exception(lldb)

Original source