After upgrading to Xcode 6, I opened an old project (that contains a subproject, so it has many targets) and I noticed that no link from my Storyboard ViewContoller to the r
Here's the proper solution i believe.
If you renamed the controller in code, you need to update the .xib file.
I could not find a way to do it in the interface builder, so do this:
Open the .xib file with a text editor: right click the file > open as > source code
In the <objects>
node find the <placeholder>
node with the property placeholderIdentifier="IBFilesOwner"
and replace the value in customClass="MyOldControllerName"
with your new controller name: customClass="MyNewControllerName"
And all your IBOutlets will work as normal again.
no one solution fixed my same problem... But i have solved by:
and then the outlets will be back again
I hope that this solution is the right one for the people who have the same problem
I've experienced similar behaviour in Xcode 6.1.1 when trying to add the first outlet to a new view.
Tried removing the references and adding the files again as suggested above with no success.
What I did find worked was writing the first property on the new view by hand. I just popped in:
@property NSString *temp;
I could then attach my outlets in the normal way. Just delete the temporary property once you've added your first outlet.
Hope this helps.
I had this, affected all projects on my machine, swift and objective c and drove me mad for ages. Finally also noticed that I could not use the refractor to rename classes either.
The fix for me was:
find . -name 'xcuserdata' -exec rm -rf {} \;
If you want to do it by hand just do the following for all your projects Delete .xcodeproj/project.xcworkspace/xcuserdata Delete .xcodeproj/xcuserdata/.xcuserdatad
Everything sprang back into life !
I was having this same issue.
It turns out I renamed my view controller class and file name. In storyboard, I had the stale value in the right pane, Custom Class -> Class. So the IBOutlets were not aligning because there were none in the missing class, which is where it was expecting to find the defined outlets.
Filling in the correct class name of the View Controller in the Custom Class field in the right pane fixed my issue.
XCode needs to be more verbose if you have a bad class name in the Custom Class fields.
In your storyboard hierarchy select the View Controller,
In the right pane Custom Class section Class
, select the drop down and your desired view controller.