Ron Dear
Ron Dear

Reputation: 505

Tab Bar will no work as a subview of another view but works fine as a subview of window?

I am trying to make a program with three subviews after the title screen. Two of the views are just standard nib files with UIViewController subclassed to control them, and the third is a Tab Bar view. I can't seem to get the tab bar items to display though. I walked through the Tab bar chapter in "Beginning iPhone Development" which adds the Tab Bar Controller right off the bat as a subview of Window in the app delegate and that works fine. What I want to do though is load up my rootView controller after the third section was chosen from the title screen and then add a Tab Bar view to that. Every time I do this though I get a blank Tab Bar with no tab bar items.

Any help you can provide would be greatly appreciated seeing as I've been working at this for a few days now.

Thanks

Upvotes: 0

Views: 2054

Answers (1)

Daniel Dickison
Daniel Dickison

Reputation: 21882

You can't push a tab bar controller to a navigation controller, which I assume is what you're trying to do. However, you can use a plain UITabBar and implement your own view switching in a UIViewController subclass (rather than a UITabBarController). See this related question.

Upvotes: 3

Related Questions