If you ever get this error, check to see that you don’t have a circular dependency between two classes.
If you do you will need to forward declare on something.
@class SPTMessageViewController
instead of
#import "SPTMessageViewController.h"
http://stackoverflow.com/questions/17624839/objective-c-error-expected-a-type
Note: If you go to use your forward declared class and you see errors like ‘Class can not be found in forward class declaration’, that’s because forward declare only makes a promise for that class. Not any inherited methods or properties.
To fix this include the header of the forward declared class in your .m file. Then you should have everything.
#import "SPTMessageViewController.h"
Leave a comment