Can't find interface declaration for my IOS view controller

Skullhouseapps picture Skullhouseapps · May 5, 2011 · Viewed 16.5k times · Source

I'm getting this error: "Cannot find interface declaration for 'BaseViewController', superclass of 'ViewController'. Here's the situation:

AppDelegate:

  • Subclass of NSObject
  • In the header file:

    #include UIApplicationDelegate

BaseViewController

  • Subclass of UIViewController
  • In the header file:

    #import "AppDelegate.h"

ViewController

  • Subclass of BaseViewController

    #import "BaseViewController.h"

The error doesn't make sense, as BaseViewController is imported in ViewController's header file. What is the problem here?

Answer

kris picture kris · Nov 6, 2011

Also check for infinite loops in your import statements