Reputation: 33
How to run code when a item on the tab bar is pressed? I am using the Tab Bar template.
Upvotes: 1
Views: 222
Reputation: 1
Toolbar buttons are similar to standard buttons. Therefore, you can also set IBAction by control dragging from the Bar Buttons to your view controllers header file and write your own action code.
Upvotes: 0
Reputation: 47241
Use the UITabBarControllerDelegate protocol and implement tabBarController:didSelectViewController: to run your code.
Upvotes: 2