using tabBar Delegate methods from tabBarController
I have a tabBarController,I want to use the delegate method of tabBarDelegate not of the tabBarControllerDelegate.i.e; I want to use
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
I am doing this:
self.tabBarController.tabBar.delegate = self;
and then using the above method but the problem is that t开发者_Go百科he above method never get called.
According to the Apple document:
The tab bar view provided by this property is only for situations where you want to display an action sheet using the showFromTabBar: method of the UIActionSheet class.
So I guess you should use the controller's delegate instead.
精彩评论