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.
精彩评论