tags:

views:

13

answers:

1

One UIViewController is shared by two Tab Bar Items (i.e., clicking either tab bar item will trigger the same view controller). How can I tell which Tab Bar Item was pressed to trigger the view controller to become active?

A: 

Ask the UITabBarController about its selectedIndex might help if your tab bar contains 5 or less than 5 tabs. You can also ask the UITabBarController about its tabBar, and ask the tab bar about its selectedItem.

Evadne Wu