Skip to content

Posts from the ‘Cocoa Errors’ Category

12
May

Could not insert new outlet connection: Could not find any information for the class named

If you get the following error when you’ve created a new class in Xcode and you’ve choose also to create nib file and you try to connect for example an UILabel to the .h file of the class:

Could not insert new outlet connection: Could not find any information for the class named

Could not insert new outlet connection: Could not find any information for the class named

Could not insert new outlet connection: Could not find any information for the class named

Then there’s nothing wrong with your code, it’s an Xcode problem. To solve it try the one of the following:

– Remove the newly created class (don’t delete it, just remove link and then re-add it);
– Save Xib file;
– Restart Xcode;
– Delete Derived Data.

12
Dec

unrecognized selector sent to instance

There’s a simple way to screw your code and get “unrecognized selector sent to instance” error. By dragging an action from an Interface Builder button to the implementation file multiple times. So if you press a button and your app crashes with “unrecognized selector sent to instance” error, select the button that is crashing (when you press it) in Interface builder and go to Connections Inspector. Look there for multiple actions to the same event.

See next screenshot:

unrecognized selector sent to instance

Here we notice Ok button has to connections to the implementation file. If you’ve added by mistake first connection and decide to delete it later, letting only the second one without sender parameter, then we try to run our app, we will notice that our app will crash when we press Ok button.

Read more »