1
votes

i'm beginner with xcode and having some problems.Everything started when i created a xib file. I created xib file and connected to the View Controller.After that it crashed with error:"loaded the "Main" nib but the view outlet was not set." Then i right-clicked to the File's owner icon on the left menu and drag it View icon below.There is appeared a menu Outlets.And i clicked view.

I run again and this time another error appeared:"this class is not key value coding-compliant for the key view." I searched a lot on the net about this crash but none of them worked.Can anyone help me about this file's owner and xib stuff?

1
I created xib file and connected to the View Controller What you did with the default xib file? and Which View controller are you using?Anoop Vaidya
I have a **ViewController and when i created xib file i went to Custom class menu on the right and typed there **ViewControllersaidozcan
Dupe of stackoverflow.com/questions/4763519/…. In future to prevent such problems, there's a checkbox when you create a view controller asking whether to create a XIB for it, if you select it then Xcode will create a XIB with the view outlets already set up.Sherman Lo
You can find answer to this and all questions related to crashes here: raywenderlich.com/10209/my-app-crashed-now-what-part-1Andrey Chernukha
i'll take your advice and recreaete the xibs with classessaidozcan

1 Answers

0
votes

Check your outlets in nib file. Then double check them. Then check if you have properly synthesized all of your properties. Then check if your file owner object in xib is set to the proper UIViewController. Then check if you have renamed any properties in your .h/.m file after setting their outlets in XIB.
Key value coding-compliant error usually occurs when you set the outlet of an object to a property that does not exist in .h/.m file.