When the user changes the selected tab of a UITabBarController
, is there an event fired to indicate that this specific action happened?
I know that viewDidLoad
can get fired if the UIViewController
wasn't loaded previously and in the case it was, a viewWillAppear
gets invoked. But neither of these will tell me that the view was shown because the tab bar was selected.
You can use tabBar:didSelectItem:
while implementing the UITabBarDelegate:
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
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