This bug has been driving me nuts since I started using Xcode (4.6.3). Whenever I try to link a Storyboard item to my code, I get the error:
Could not
I was getting a similar problem, "Could not find a class named..." and the cause was stupid on my part once I figured it out. Make sure you aren't dragging from the item to the interface - make sure it's being dragged to the class itself
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.
Just try to delete Derived Data for the project
None of the steps above worked for me, but I think I may have discovered the issue. At least it is what worked for me, and it is not a bug in Xcode.
When in the assistant editor look at the top of the window that has the code for your viewController. The third option from the right likely says "Manual", but it should say "Automatic". Once I changed this, the problem was resolved!
the following steps works for me hope that works for you also
1- You need to reopen you project after closing Xcode.
2- Wait for indexing project files
3- Check if it work or not
4- If still not working follow step 5, if not happy for you :)
5- Clean and Build your project target
For me, the view I had specified a custom class for was failing to be compiled by interface builder. It was marked @IBDesignable
.
Removing @IBDesignable
, and then adding my outlets, and then marking it as @IBDesignable
resolved the issue in my case.