I have 4 tabs in my iphone application. When user will click a button in tab-1, I want to move/switch user to another tab suppose tab-2.
How to do that?
You can use
[self.tabBarController setSelectedIndex:tabIndex];
where tabIndex
is the index of the tab you want to switch to.
Might also point out that if you are inside a view, you should use super instead of self.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With