unbekannter Typname in Ziel c

Ich bin Recht neu in objective-c und haben einige grundlegende Probleme.

Schrieb ich ein einfaches Programm mit einem navigator, und alles hat gut funktioniert.
dann habe ich die paar Zeilen code (kann nicht einmal daran erinnern, was genau, und es scheint keine Verbindung zu dem problem) und das problem aufgetreten ist. Ich habe versucht, Strg+z, und das problem blieb:

Ich das Programm und bekomme diesen Fehler:

1. unknown type name "mainController"
2. property with 'retain (or strong)' attribute must be of object type

während mainController ist der erste Bildschirm geladen werden.

Dies ist das appDelegate.h-Datei:

#import <UIKit/UIKit.h>
#import "mainController.h"
#import "WishesList.h"
#import "Wish.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) IBOutlet UINavigationController *navController;
@property (strong, nonatomic) IBOutlet mainController *viewController; //this line creates the errors
@property (strong, nonatomic) WishesList *WishesArray;
@property (strong, nonatomic) NSIndexPath *temp;

@end

dies ist der relevante Teil der appDelegate.m-Datei:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
    WishesArray = [[WishesList alloc]init];
    temp = nil;
    [self setViewController:[[mainController alloc]init]];
    [self setNavController:[[UINavigationController alloc]initWithRootViewController:self.viewController]];
    [self.window setRootViewController:navController];
    [self.window makeKeyAndVisible];
    return YES;
}

Und das ist mainController.h:

#import <UIKit/UIKit.h>
#import "addWishController.h"
#import "displayWish.h"
#import "WishesList.h"
#import "Wish.h"

@interface mainController : UIViewController

@property (nonatomic, weak) WishesList *list;
@property (nonatomic, strong) IBOutlet UITableView *wishTable;

- (void)addWish;

@end

es schon geklappt...

können Sie es herausfinden?

Dank

InformationsquelleAutor der Frage Amit Hagin | 2012-01-10

Schreibe einen Kommentar