unknown type name in objective c -
I'm new to objective C and for some basic problems.
I have written a simple program using a Navigator, and everything worked fine, then I've added some lines of code (can not even remember what it really is, and with this problem No relation) and there has been a problem. I tried ctrl + z, and the problem persisted:
I run the program and I get these errors:
1 unknown type of name "main controller "2. The object must be of type object with 'maintain (or strong)' attribute
While the main controller is the first screen to load.
This app is the Delegate.h file:
#import & lt; UIKit / UIKit.h & gt; #import "mainController.h" #import "WishList.h" #import "Wish.h" @interface AppDelegate: UIResponder & lt; UIApplicationDelegate & gt; @protecti (strong, non-fixed) UIWindow * window; @ Property (strong, non-monotic) IBOutlet UINavigationController * navController; @protecti (strong, non-fixed) IBOutlet main controller * view controller; // This line creates properties @ properties (strong, nonatomic) WishesList * WishesArray; @ Property (strong, non-constructive) NSIndexPath * temp; @end
This is the relevant part of the appDelegate.m file:
- (BOOL) Application: (UIApplication *) application did FinishLaunchingWithOptions: (NSDictionary *) Launch option {shelfindo = [[UI window light] InitVithframe: [[USScreen main screen] Bound]]; Best wishes = [[Good wishes] Init]; Temp = zero; [Self set controller: [[Main Controller Allocation] Init]]; [Self-Setnet Controller: [[UINavigationController alloc] initWithRootViewController: self.viewController]]; [Self. Window Setterview controller: nine controllers]; [Self. Windows and knowledgeable]; Yes come back }
And it is the main controller:
#import & lt; UIKit / UIKit.h & gt; #import "addWishController.h" #import "displayWish.h" #import "WishList.h" #import "Wish.h" @ Interface Main Controller: UIViewController @property (nonatomic, weak) WishesList * list; @ Property (non-dynamic, strong) IBOutlet UITableView * willpower; - Add (zero) Addition; @end
It is already working ...
Can you find out?
Thank you
This problem occurs only once with me.
I was importing "APPDelegate.h" into my H file and in my APPDelegate.h. I was also importing the file (this should not be a problem but ...)
What did I do: I changed my own import. M and it worked :)
Comments
Post a Comment