how to controll over tabbarview controller?
I've a problem that in my tabbarviewcontroller
there are many viewcontroller
in a particular tab button.I w开发者_开发知识库ant that when I press tab button it should come first viewcontroller
regarding that tab button not the current viewcontroller
of that tab button. please some one help me.
You cannot control this. TabBarController will always show the rootViewController corresponding to that tabBarButtonItem when you tapped the button again.
EDIT
Then read TabBar Delegate methods like tabbar didSelectItem it's something like that. Implement that delegate method like in appDelegate and then you can always check show view1 when that button index is tapped. Here is the method. You can get the index and pop the view2 so it will always view1 displayed.
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item; // called when a new view is selected by the user (but not programatically)
精彩评论