0

I added a custom view controller class with interface (.h), implementation (.m) files, and UI (.xib) to an existing project.

When I ctrl-click and drag between the nib and the interface, it will not place an outlet or IBAction when I drag, so I can't link a UI element to a property. Also, XCode does not bring up the corresponding interface file when I view the nib in assistant editor mode.

Note: I changed the name of the custom class. I changed the filename and the references to it in the source.

Yakubs
  • 161
  • 2
  • 11

1 Answers1

5

Make sure you click on file's owner on the left and then in the identity inspector on the right, put in the custom class. You should then be able to make connections.

JMarsh
  • 934
  • 7
  • 19
  • Thanks, this worked. My hack way of accomplishing this was to open the .xib file with a text editor and search for references to the old class name and change them. – Yakubs Feb 22 '13 at 15:24
  • Haha, good to know. Glad to help! Wouldn't mind an upvote as well! – JMarsh Feb 22 '13 at 15:25