iosobjective-cinterface-builder

iOS 7 - Add a view to a navigation controller and make it the first view to appear


I have 4 views already in my story board and they are all in a navigation controller, however, I need to add another view and make that newly added view my first view. I have added my view already, however, whenever I go to Editor -> Embed In -> Navigation Controller, I end up getting a new Navigation Controller.

Is there a way to use my existing Navigation Controller? Or am I forced to use/add a new one?


Solution

  • You need to make "new" viewcontroller rootViewController of your UINavigationController.

    1. Select your NavigationController,
    2. Click and drag from NavigationController while holding your Control key down.
    3. Drop on the new view controller.
    4. Select rootViewController from the popup menu.

    Once done, you should be all set.