Reputation: 2028
I have a tab bar controller linking 3 view controllers. On controller A, I have a button linking to controller C. But when I use segue or presentViewController:animated:completion:
it will show controller C but won't update the tab bar item. Is there a way to make it update by code so the user won't have to press it to get it to work properly. Thanks.
Upvotes: 1
Views: 214
Reputation: 24714
You can use setSelectedIndex
of UITabBarController
[self.tabBarController setSelectedIndex:2]
Upvotes: 2