开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜