我的UITabBarController的didSelectViewController方法没有得到调用? [英] My UITabBarController's didSelectViewController method is not getting called?
本文介绍了我的UITabBarController的didSelectViewController方法没有得到调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的代码存根为我的app-delegate.m - 它从不被调用。
Here is my code stub for my app-delegate.m -- it never gets called.
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
NSLog(@"%s", __FUNCTION__);
}
它在此app-delegate.h中定义
It is defined in this app-delegate.h
@interface OrioleAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
UIWindow *window;
UITabBarController *tabBarController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@end
推荐答案
您在 UITabBarController
和您的应用程序委托之间建立连接?
Did you make a connection between your UITabBarController
and your application delegate?
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
...
tabBarController.delegate = self;
...
}
这篇关于我的UITabBarController的didSelectViewController方法没有得到调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文