Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Matt Ober
2,038 PointsMake TabViewController show up for the middle tab?
Hi, I'm working on an application where I'm using the ribbit iOS tutorials to guide me through some of the basic application setup
In the ribbit app, they have the far left tab as the default view controller. I'm wanting to make it so that the middle tab is what the tab view controller defaults to. Is there a way to do this?
A few other places online have said to do this using the tabViewController and set at index, however, the ribbit tutorials seem to default to the far left tab view controller and skipping using a tabViewController entirely.
Kind of new still, so sorry if that doesn't really make sense. I'd be happy to rephrase anything if needed
Thanks!
2 Answers
Rashii Henry
16,433 PointsIn interface builder you should be able to just drag the tabs around into the order you prefer. Whenever you drag a new controller onto the storyboard CTRL+Click and connect it to the RootViewController and select Relationship.
Matt Ober
2,038 PointsYou're right in the fact that you can drag the tabs into the order you want. However, I want the "dashboard" off my application to be the middle tab of my application, and open up to that tab at the start as well.
So this way, my user can go left to get to the "sales" tab, and right to get to the "contacts" tab.