2

Terminating app due to uncaught exception:

'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set.

I am getting this error in xcode 6. I know how to set view outlet in xcode 5 or below version (go to connection inspector drag outlet radio button to file's Owner then it pop with a view and then click on view sets the outlet) but view popup is not comming in xcode 6 (beta). Is it a xcode 6 bug or it has different way to set an outlet. Can anyone help please?

Disposer
  • 6,201
  • 4
  • 31
  • 38
Brammanand Soni
  • 177
  • 1
  • 4
  • 12
  • 3
    This usually happens when you delete outlets in the source file after having set them up in IB. Look through the outlets inspector in IB for that view controller. One or more of them will have a little exclamation! point next to them. Delete those. – danh Jun 05 '14 at 20:23
  • http://stackoverflow.com/questions/26442414/libcabi-dylib-terminating-with-uncaught-exception-of-type-nsexception-lldb/27389647#27389647 – Trapp Dec 13 '14 at 21:38

3 Answers3

4

It means you have a view controller, but you have not set the view outlet. In interface builder, right click on the view controller, and outlet and action popup will appear. Find the view outlet, and drag it to the topmost view in the views list.

Léo Natan
  • 56,823
  • 9
  • 150
  • 195
2

I had this problem and basically it was due to a button being assigned to an outlet (which i did not need) and and action that I was actually using. To resolve this type of issue, you need to make sure that your buttons are correctly assigned and get rid of any outlets that you do not need or that you may have added by mistake.

TheRealRonDez
  • 2,807
  • 2
  • 30
  • 40
-1

It happens to me when you changed ui element in storyboard, didn't clean them completely. Just right click on the top view controller, and it will show which one should be deleted

ForeverYang
  • 81
  • 1
  • 7