开发者

help with xcode warning

I get the following war开发者_如何学JAVAning in my appdelegate.m file:

warning: incompatible Objective-C types 'struct QuestionnaireViewController *', expected 'struct UIViewController *' when passing argument 1 of 'setRootViewController:' from distinct Objective-C type

QuestionnaireViewController subclasses UIViewController so I'm, not sure why it's causing problems...


It sounds like you probably forward-declared the class using @class QuestionnaireViewController and didn't actually import the header. If you did this, the compiler only knows that the class exists, but it doesn't know anything else about it, so it doesn't know that it is a subclass of UIViewController. Make sure you #import "QuestionnaireViewControllier.h" inside of your .m file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜