1
我有一個帶有4個按鈕的標籤欄。當用戶按下A按鈕時,我想調用functionA。當用戶按下B按鈕時,我想調用functionB等。iPhone SDK:如何以編程方式確定哪個按鈕被按下?
我已經實現了UITabBarDelegate。
I have this code and it fires as expected when any button on the tabbar is pressed.
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
我所尋找的是一個代碼片段演示如何檢測按下了委託其內部按鈕大概使用項目。
爲什麼讓它很難?您可以改用tabBarController.selectedIndex。 – iwat 2010-02-03 08:58:35
好點。我忘了那個財產...... – afarnham 2010-02-05 03:53:20