How to conform to UITabBarControllerDelegate
Posted
by 4thSpace
on Stack Overflow
See other posts from Stack Overflow
or by 4thSpace
Published on 2010-02-06T20:34:47Z
Indexed on
2010/05/14
3:14 UTC
Read the original article
Hit count: 494
I have a tabbar based application and do the following to get a reference to the application delegate:
MyAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
Which then gives this warning:
warning: type 'id <UIApplicationDelegate>' does not conform to the 'UITabBarControllerDelegate'
My application delegate header looks like this:
#import <UIKit/UIKit.h>
@interface MyAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
UIWindow *window;
UITabBarController *tabBarController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@end
The only methods in the .m file are applicationDidFinishLaunching and dealloc. What else do I need to conform to the protocol?
© Stack Overflow or respective owner