grouser
grouser

Reputation: 628

Error starting APP from xib file

I was using Storyboards to start the APP but in the end i have had to remove them. So, i have changed in Xcode the option Main Interface to my controller. Now, when i start the APP i get the next error:

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x711d750> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.

In my AppDelegate i have the next function

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    return YES;
}

Upvotes: 0

Views: 48

Answers (1)

nsgulliver
nsgulliver

Reputation: 12671

This kind of issues occur because your Outlets might not be connected properly or deleted by mistake, so make sure you are connecting your IBOutlet Properly, e.g. you might have an outlet link in an XIB/storyboard that points to an IBOutlet in your code that no longer exists.

Secondly make sure you are adding your root Controller on UIWindow in your didFinishLaunchingWithOptions method, something like this

self.window.rootViewController = yourRootViewContoller;
[self.window makeKeyAndVisible];

Upvotes: 1

Related Questions