Having problem adding UINavigationController in UIViewController

Discussion in 'iOS Programming' started by TitanMod, Jul 24, 2008.

  1. macrumors newbie

    Jul 24, 2008
    Hi Guys,

    I'm working on my 1st iPhone App and stuck on a weird problem.

    The app is a simple Utility app (like Weather or Stock) based on SDK's Utility Application Template. It has MainView, FlipsideView and an Info button to toggle each other. I also got the toggleView() function for free from template.

    The view hierarchy from template is like this:
    InfoButton, MainView, FlipsideView

    All 3 views (RootView, MainView and FlipsideView) are simple UIView. Now I want to replace FlipsideView with a NavigationView (because I need provide drill down settings pages, which obviously should be put into a navigationController). But when I did that, I got the UI look like this:

    Status Bar (20px)
    Blank Space (20px)
    Navigation Bar
    TopView of NavigationController

    I assume, normally NavigationController.view should be directly put into UIWindow so the real status bar will cover that blank space. But in my case, it belongs to a normal UIView (RootView) which already been pushed down by the status bar.

    Anyone has the similar issue? Do you know if there any workaround?


Share This Page