开发者

"warning: type 'id <UIApplicationDelegate>' does not conform to the 'UITabBarControllerDelegate' protocol"?

"warning: type 'id <UIApplicationDelegate>' does not conform to the 'UITabBarControllerDelegate' protocol"?

Hey Guys,

Anyone have any idea why I'm getting the warning pictured in the attached image? Right above the code in question is a comment from the code I got from "More iPhone 3 Development" which is an Apress book. The author trying to tell me something about typecasting to quiet the warning but I don't know how.

"warning: type 'id ' does not conform to the 'UITabBarControllerDelegate' protocol"

I'm not using a tab bar or it's delegate anywhere in my app. I get the same warning in b开发者_开发问答oth places where I use:

AV_MonitorAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];

to get a pointer to my app delegate.

Thanks.


Try casting it to the appropriate type before the assignment,

AV_MonitorAppDelegate *appDelegate = (AV_MonitorAppDelegate *)[[UIApplication sharedApplication] delegate];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜