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
For me removing them from your target membership in the right column and adding them again did the trick
This is the EASIEST step that I did to fix this problem.
Well in my case, the thing that worked (it's a litle weird, but worked) is the following:
Try to add a datasource (ex. an extension to the ViewController like a UITableViewDataSource). Xcode will try to reload the ViewController. Then I wrote some method of the protocol (in the beginning Xcode did not autocomplete the methods, but wrote it out manually), then I added the IBOutlets, and then lastly, I removed the datasource.
Example:
class TestViewController:UIViewController{
// This viewController presents “Could not find any information for class named ViewController”
}
extension TestViewController:UITableViewDataSource{
//Add Some methods of the protocol, Xcode will try to autocomplete and then it's going to reload the class, from then you can add your IBOulets / Actions .. And remove this extension if you don't need it otherwise.
}
I tried all of these answers, the problem for me was related to Xcode not being able to index the files. I fixed this by simply quitting Xcode and reopening the project. Of course I did that after trying all of the above solutions :p
What worked for me was, instead of dragging the connection from the button to the code, was:
after I linked my code in this way, it worked normally from thereafter.
As my testing experience,if you delete a class which was associated in the Xcode,and than add file again,than this issue will occur.