Question

Possible Duplicate:
Programmatically pressing a UITabBar button in Xcode

I've four tabs in Main tabbar controller. On 1st Tab, there is "Dashboard" Page which is displayed when User registered with Device-ID.

For non-existing Users, It'll prompt a message for Registration. And By clicking on "OK" button, I want to jump on 4th Tab which is used for Set-Up module.

So, how can I set Tabbar index as done with older earlier versions and navigation in Tabbar ?

Please tell me any Solution.

Thanks in Advance.

Was it helpful?

Solution

Execute the following line of code to get the tabBar begin with the 4 th tab selected when it will be presented

 [tabBarController setSelectedIndex:3];

OTHER TIPS

You have to implement this code first If you are using Tabbar based Application in Storyboard.

UITabBarController *tabBar = (UITabBarController *)self.window.rootViewController;

Then,

[tabBar setSelectedIndex:3];

As you said : AppleDelegate

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top