Error in Xcode 6 - View Controller Does Not Have an Outlet Named (Subview)

Xcode 6: can't connect any IBOutlet to ViewController

You can also see that the link between the parent view and the custom class is broken (not visible anymore) which is a huge problem.

I had the exact same issue with the app i'm working on actually, updating XCode from 5.xxx to 6.1. The workaround that worked for me was to remove the reference of every view controller and re-add them to the project...

To everyone facing that issue, here's the (annoying) trick :

  • Step 1 : select both .h and .m view controller files
  • Step 2 : remove the reference of those files
  • Step 3 : re-add the files to your project tree
  • Step 4 : open the storyboard, eventually re-build the project and smile

I can understand those things could be reaaally annoying, but it worked for me... Hope it will help someone else !

IBOutlets not showing on XCode 6.1 (6A1052d)

I've found a "solution", or workaround. Deleting the XCode data is not enough, and it's not enough to just restart it. The following sequence makes the Outlets magically re-appear and work properly:

  1. Clean project
  2. Close XCode
  3. Delete all contents of ~/Library/Developer/Xcode/DerivedData/
  4. Restart MacOs

By doing this, when you re-open XCode and it reindexes, it will show the outlets as expected.

Can't link connector from IBOutlet to View Controller

As long as your class "B" is not a view controller, this should be pretty easy. The first step is to go to your storyboard or related .xib file and find the view controller that corresponds to "AViewController." Then, find the little yellow circle with the white square inside of it (top of view controller) and control+click on that. You should see a black box pop up. (see attached image). In the box, there should be a section called "Outlets." Do you see a line below that related to your "B" object? If so, then drag from the white circle on the right side of that line to the object that represents the "B" class on your view controller. This will wire it up.

If you do not have an entry for "B" in the black box, then something is wrong with the setup of the view controller.

If you have an entry for "B" in the black box, but can't connect it to your view controller, then take the following steps: Make sure you have an object of class "B" on your view controller in the storyboard. If you don't, then that's your problem. If you do, but you still can't get it to work, you probably need to set the class type of the object in the storyboard. To do that, click on the object on the storyboard and look in the right panel in xcode (screen shot #2 below). In the panel, click the 3rd icon over (it looks like a little square). There you will see something that says "custom class." If under "class" it does not say "B", then that's your problem right there. And if that is your problem, then set the class to "B" and then try wiring your outlet again with the steps outlined in the first paragraph of my answer.

enter image description here

enter image description here

Cannot create outlet connections to subviews in Interface Builder (Xcode 5)

You can manually write the IBOutlet property declaration in the @interface of the custom view subclass, and assuming you've defined the base class of your subview in IB, then you can drag from the outlet circle in the code back to the control in the scene.

enter image description here

Or, as you point out, Warren Burton suggested both this technique and another in his answer to this other question, Can't Wire to Subview in IB.

Swift: unable to access subviews from xib

Deleting the xib file and recreating it fixed the issue.

Loaded nib but the 'view' outlet was not set

The View Identity - Class Identity was not set. After setting it to the appropriate class, the issue was resolved.



Related Topics



Leave a reply



Submit