How to instantiate a Forward class?

172 views Asked by At

I got a warning like Attempting to use the forward class *** as superclass when i tried to set a third party class as superclass of my view controller.

How can I instantiate this class or use as a superclass of my class ?

Thanks for any help..

1

There are 1 answers

0
trojanfoe On

Your error will occur in this example:

MyClass.h:

@class SuperDuperClass;

@interface MyClass : SuperDuperClass

@end

The fix is to let the compiler see the class definition by including its header file:

#import "SuperDuperClass.h"

@interface MyClass : SuperDuperClass

@end

That's about as specific as I can get with the little information provided in your question.