bhatti
bhatti

Reputation: 335

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 the above method never get called.

Upvotes: 0

Views: 1930

Answers (1)

Nevin
Nevin

Reputation: 7809

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.

Upvotes: 1

Related Questions