如何通过单击TabbarItem按钮获得Tabbar项目按钮的Click事件?

时间:2010-05-10 08:32:41

标签: iphone

我已经使用了UITabbar,我使用了两个按钮作为TabItem。我想通过点击那两个按钮来执行两个不同的动作,那么如何在点击特定的Tabbar按钮时获得特定的动作。

1 个答案:

答案 0 :(得分:26)

您最有可能想利用UITabBarControllerDelegate,然后处理didSelectViewController方法。

- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController

请点击此处了解详情:http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITabBarControllerDelegate_Protocol/Reference/Reference.html

相关问题