General

UINavigationController inside a UITabBarController23 Jun

I was having a head-banging session last night trying to get a UINavigationController working within a UITabBarController. I reached out to peers from Big Nerd Ranch, and received a very succinct solution from Brian Slick:

I just yesterday rewired my program to use a XIB file in this way. The resulting structure looks like this:

Tab Bar Controller

…..Tab Bar

…..Navigation Controller

……….Navigation Bar

……….MyViewController1

……….Tab Bar Item

…..Navigation Controller

……….Navigation Bar

……….MyViewController2

……….Tab Bar Item

Just drag however many UINavigationControllers you need from the palette to the Tab Bar Controller. Crack open each one, and set the class of the View Controller inside to be your appropriate custom class.

Just follow along the XIB paths, and it works flawlessly. Awesome. (Also, don’t forget to set the various tabs to NavigationController at the root of the UITabBarController.)

1 Comments For This Post

  1. Benjamin Reed

    Hah! I’ve been banging my head on this all day, and I was apparently trying to make it *way* too complicated. This worked great, thanks!

Leave a Reply

About Me

I am an expert in digital video, a founder of multiple companies, inventor of the verified viewing process, and have numerous patents pending concerning methods of digital video distribution. Since 1996 I have provided software and service solutions to entertainment production companies throughout Los Angeles and New York. My companies, software, and services have helped produce the television shows ‘ABC’s Extreme Makeover: Home Edition,’ ‘MTV’s Yo Momma,’ ‘FOX’s Nanny 911,’ and ‘Comedy Central’s The Showbiz Show with David Spade,’ among many others.

I hold a Bachelor of Science from Arizona State University, am an active member of the Producer’s Guild of America, and public speaker. I am also a published author: Digital Video Hacks (O’Reilly; ISBN 0596009461) and Videoblogging (Wiley; ISBN 0470037881) have helped thousands of people understand how to produce and distribute digital video with a high level of competence. When not consumed with work, I live, love, and enjoy life with my family.

Contact Form

If the you have stripped your referrer fields in you browser, or are using a proxy or are behind a firewall, this form may not work!