Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not insert new action connection Error

Tags:

xcode

iphone

I get this error, when try to create new action for UIButton by dragging blue arrow from UIButton to my header file (you know, this new feature of XCode 4...)

When I create action in code by myself and connect it in old way, simply by dragging from button to File's Owner, it's works well

Here's screenshot: Error screenshot

like image 919
GeRyCh Avatar asked Aug 24 '11 13:08

GeRyCh


3 Answers

Make sure your .m file exists in the project and on disk. Make sure it is correct with an @implementaiton-@end block. Open it in Xcode, close it, if the error persist, restart Xcode.

Xcode is trying to write to EditPUViewController.m (in the dealloc method etc.) but could not find it.

Also, it always helps to hard-clean the project with +++K.

like image 151
Mundi Avatar answered Oct 21 '22 16:10

Mundi


Try this:

Open Organizer then Project Tab.

Clear the "Derived Data". Xcode should re-index your project then and code sense should work. At least worked for me.

like image 27
Rusy Avatar answered Oct 21 '22 18:10

Rusy


I had a comparable problem when trying to connect an action. To solve it I manually added the IBAction and then XCode allowed me to connect from the button to the code.

like image 8
Roger Avatar answered Oct 21 '22 18:10

Roger