我需要檢索當用戶點擊過tabbaritem成的UITabBarController改變的東西.. 這裏是我的代碼:IOS檢索時的UITabBarController項目被選中
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
if (item == [tabBarController.tabBar.items objectAtIndex:2]) {
item.title = @"add shot";
}
else
{
item.title = @"Race";
}
}
,但如果我這樣做:
self.tabBarController.tabBar.delegate = self;
我收到一個SIGKILL ...
什麼是正確的解決方案?在此先感謝
與tabBarController.delegate不給我SIGKILL,但didSelectItem方法是UITabBarDelegate的,不UITabBarControllerDelegate – ghiboz
更新的答案,嘗試了這一點。 – chown