What solved this issue for me was actually deleting the class from the project.
Steps:
This seems to force Xcode to link the class back into the storyboard.
Note: for me the following did not work:
I think this is a bug on Apple's part
In case anyone is still frustrated by this, there's a trick to get things working.
What I do is manually enter an outlet into my class, for example: @IBOutlet weak var someView: UIView!
, and drag from the code to the view in IB or storyboard. After this, I am able to drag from IB / Storyboard to my class to make connections, assistant editors recognizes the class in "Automatic", etc...
Works every time.
For me removing them from your target membership in the right column and adding them again did the trick
Sometime Xcode does due to VC not referencing class file. The simple solution for this is:
write property manually as given.
class YourClassName{
@IBOutlet weak var YourTableName: UITableView!
}
This will make a empty link sign before @IBOutlet, open your project in assistant editor then click link sign and drag into the View which you want to connect (i have connected with TableView). and thats it. Enjoy Happy Coding!!!
I just had this problem on April 2017 with Xcode 8
Simply creating an outlet through code and compiling fixed it. eg:
@IBOutlet weak var containerViewHeight: NSLayoutConstraint!
You got to love Xcode…
Edit: Still happening on Xcode 9
I tried everything and it didn't work, so for me what worked is:
All my view controllers were not being recognized, so deleting all files and re-adding was not an option as this is a big project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With