i have 2 tab buttons with Nib files.... and i have a button on tab1 ..on pressing it i want to show tab 2's view (not click on tabbar button2)..means i want to click second tabbar button through programming...
how can i do it ....is it possible ?
i have 2 tab buttons with Nib files.... and i have a button on tab1 ..on pressing it i want to show tab 2's view (not click on tabbar button2)..means i want to click second tabbar button through programming...
how can i do it ....is it possible ?
You'll have to create a function with this in it:
[self.tabBarController setSelectedIndex:1];
So eg:
- (void)selectNextTabBarView:(id)selector {
[self.tabBarController setSelectedIndex:1];
}
and then on your button you need:
[myButton addTarget:self action:@selector(selectNextTabBarView:) forControlEvents:UIControlEventTouchUpInside];