How to correctly place a UINavigationBar in a complicate view hierarchy?

The root of the problem is that you are mixing controller hierarchies with view hierarchies.

The root of the problem is that you are mixing controller hierarchies with view hierarchies. Assuming that maincontontroller is a normal view controller, I would move your uinavigationcontroller up to be it's sibling. That way, you don't need to workaround anything.

If a UINavigationController doesn't have a parentViewController, it basically assumes it's in the window.

I need that hierarchy since topcontroller has a view that has to displayed always on top and it has to rotate through the device orientation changes. How can I make the UINavigationController direct sibling of the maincontroller? – rano Mar 8 at 19:17.

I found a solution. Like amattn said I had to simplify the hierarchy, but this can't be done so easily since I have the constraint to make the topview always visible and being able to rotate. The idea is to subclass UINavigationController and to put the view and its management into this subclass.

This way an instance of this new controller can be applied directly to the main window and other controllers can be pushed in it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions