views:

32

answers:

1

Hello,

I want to programmatically initialise my tabBarController to the last tab selected by the user. This works OK for my standard tabs, but if the uwer was on the "more" tab, I cannot figure out how to initialise it as this tab doesn't (to my knowledge) have an index).

Is anyone aware of a way of doing this?

+1  A: 

Straight from the -[UITabBarController selectedIndex] documentation:

To select the More navigation controller itself, you must change the value of the selectedViewController property instead

So just do:

[controller setSelectedViewController:[controller moreNavigationController]];
Mike Abdullah
Thank you! Not sure why I didn't find that:)
MM