Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find interface declaration for my IOS view controller

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?

like image 886
Skullhouseapps Avatar asked May 05 '11 06:05

Skullhouseapps


2 Answers

Also check for infinite loops in your import statements

like image 66
kris Avatar answered Sep 23 '22 15:09

kris


Try adding

#import <UIKit/UIKit.h>
like image 26
Dearwolves Avatar answered Sep 23 '22 15:09

Dearwolves