3
votes

I need to receive a message whenever a user touches a Tab Bar item (even if it corresponds to the currently displayed view). I'm uncertain as to whether to use the UITabBarDelete protocol, which provides:

- (void)tabBar:didSelectItem:

Description:

Sent to the delegate when the user selects a tab bar item.

OR, from the UITabBarControllerDelegate:

- (void)tabBarController:didSelectViewController:

Description:

Tells the delegate that the user selected an item in the tab bar.

Seems like either one could be used. In my case, I need to reload/reinitialize the view associated with true current Tab Button.

Thanks for any guidance.

1

1 Answers

1
votes

You can use either.

in this case: - (void)tabBar:didSelectItem: you'll have to access the corresponding view controller from the viewControllers array.

whereas, in this case: - (void)tabBarController:didSelectViewController: you'll get it as an argument.