Alex
Alex

Reputation: 7612

iphone - Setting the starting tab bar

Is it possible to set the starting controller in a tab bar controller not as the 1st one (not as the first tab icon on the tab bar), but as the 3rd one (3rd icon on a 4-icon tab bar)?

Thanks!

Upvotes: 0

Views: 186

Answers (2)

Ajay Sharma
Ajay Sharma

Reputation: 4517

Ya you can do it easily....just use this ,You can do it either programmatically or in Xib file

[self.tabBarController setSelectedIndex:2];

Upvotes: 1

Ravin
Ravin

Reputation: 8564

Yes, it is. In code/xib you have to set tabBarControllers ' selectedIndex property as 2. (index starts from 0)

Thanks,

Upvotes: 2

Related Questions