Xcode 6: Can't Connect Any Iboutlet to Viewcontroller

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 !

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 connect IBOutlet to a UIViewController (or subclass thereof)

You should do this by code. And not with IBOutlets.

First: set a storyboard ID to each of the UIViewControllers.

Second:

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let viewController = storyboard.instantiateViewController(withIdentifier :"blueViewController") as! UIViewController

And connect it to a property.

You do this for all three UIViewControllers.

Can't connect IBOutlet in Interface Builder

I did a combination of the things in this thread and I finally had success.

In Interface builder (not xcode)

  1. File->Reload All Class Files
  2. File->Read Class Files (select MyClass.h)
  3. Reconnect File's Owner by

    a. Setting the Class to "MyClass"

    b. Reconnecting the View to the File's Owner's View

Everything is back to normal now. Weird.

Hope this helps more than it confuses ;-)

Unable to connect IBOutlet from storyboard to UIView subclass

After trying some of the given solution what finally worked is by restarting the my macbook. It seems like a bug on XCode's side. Oh well.

Can't connect TableView @IBOutlet to ViewController in Swift 2

Chris,refer this image.Maybe it helps.

enter image description here

enter image description here

Can't hook up IBOutlet or IBAction to a View Controller written in Swift after deleting the ObjC version

Seems to be bug in Xcode 6. You can resolve this by Changing the ViewController Custom class in the identity inspector to some another class press return and again change the class to original class you want then press return.



Related Topics



Leave a reply



Submit