xpepermint
xpepermint

Reputation: 36243

iPhone UINavigationController inside UIViewController

Steps:

I believe this should show me the FirstViewController with the navigation bar. If I do this directly on the MainWindow.xib things are working as I expected but here I can't see the navigation bar. What am I missing? THx!

UPDATE: So the problem is only that in case I use UINavigationController inside some additional controller (BaseViewController.xib here) instead of MainWindow.xib i don't see the navigation bar.

Upvotes: 3

Views: 5554

Answers (1)

Seamus Campbell
Seamus Campbell

Reputation: 17906

I can't tell if you're trying to connect your navigation controller directly to your window, just from a second XIB (which should work) or if you're making your navigation controller a subview of another view, which won't work.

UINavigationController is only intended to be used as either the primary subview of a UIWindow or as a subview of a UITabController. Apple doesn't want you embedding a navigation controller in other contexts.

See Combined View Controller Interfaces in the View Controller Programming Guide for more details.

Upvotes: 3

Related Questions