开发者

Using a UITabBar in a View-based app not working

I have added a UITabBar to a View-based application, hooked up my View Controller as follows:

@interface SomeViewController : UIViewController<UITabBarDelegate> {    

...

UITabBar *tabBar;

...

@property (nonatomic, retain) IBOutlet UITabBar *tabBar;

Inside my implementation file I have done this:

@synthesize tabBar;

- (void)tabBar: (UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
{
}

I went into IB and hooked tabBar up to File's Owner tabBar.

My problem: clicking on 开发者_开发知识库a tab bar item never fires off the didSelectItem method. Am I missing or mis-doing a step?


Did you set the delegate of the tabbar to self?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜