views:

374

answers:

2

I am using UITabbarController with 8 to 9 items (these are UINavigation controllers)

It is easy to select an item programmatically using

tabbarcontroller.selectedIdex = x;

if x value is between 0 to 4 then it's work as expected but if it's greater than 4 then it's select "More" as a view controller.

How can we programmatically select an item under "More" list ?

any help would be appreciated..

Thanks in advance

A: 

This only works in OS 3.0, but in order to access the items higher than the 'More' index you need to use the selectedViewController property and pass the pointer to a specific UIViewController instead of using selectedIndex.

Ramin
`self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:5];`I did that way but no luck, could you please provide me some snippet for that.
Amit Vaghela
Did you verify that the viewControllers array has the proper values in it? Modifying the array can end up truncating things. You may have to maintain your own separate viewController array.
Ramin
A: 

I've already answered this question here

Stephan

Stephan Burlot
it didn't work for me, 3.0 might be the reason. Thanks for your help.
Amit Vaghela