I have myController.h and myController.m defined, and proceeded to create a myController.xib with the Wizard. I can't, however, connect the controls from the xib file to the class interface. Usually when I drop the connection cross hair on the File's Owner icon, it'll show me a list of properties that have been declared as IBOutlet, but this time it's just nothing.
I thought the names of the class files and XIB file (myController) automatically binds File's Owner, but apparently that is not the case.
How can I manually bind the two?
I've experienced the same issue while in Xcode 4: while trying to make a connection to file's owner, the icon did not respond while dragging the connection line and hovering over file's owner. Resetting the custom class didn't work. I ended up trying quitting and restarting Xcode and only this did the trick.
Go to the
Identity Inspector
(Cmd+Option+3) and change the class tomyController
.Here it is in 5.1:
I thought I would add this screenshot as it took me some time to find it!
Had the same question... XCode 4.2 enables to create a subclass of UIViewController and there you can optionally check the "with XIB for user interface" option.
New File... >> UIViewControler subclass >> "with xib..."
I found a way to do it manually... When the world is not using XIB(s) anymore... Open the XIB or NIB file in your favourite text editor
you will find this line there...
Change the
MyClassName
to the class you want to refer it to, save the file and your file's owner will be changed. Caution: Close Xcode (To auto reload the changes) and also take a backup in case you mess up something.