Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 Interface Builder: How to set File's Owner

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?

like image 789
Haoest Avatar asked May 28 '11 18:05

Haoest


People also ask

What is file's owner in Xcode?

About the File's Owner One of the most important objects in a nib file is the File's Owner object. Unlike interface objects, the File's Owner object is a placeholder object that is not created when the nib file is loaded. Instead, you create this object in your code and pass it to the nib-loading code.

What is file's owner?

Initially, a file's owner is identified by the user ID of the person who created the file. The owner of a file determines who may read, write (modify), or execute the file.

Where is Interface Builder in Xcode?

First, in Xcode, go to the Resources folder from the tree view on the left and select MainMenu. xib . It will open in the main view. This is where you are going to build you UI.


2 Answers

Go to the Identity Inspector (Cmd+Option+3) and change the class to myController.

like image 143
Deepak Danduprolu Avatar answered Sep 21 '22 15:09

Deepak Danduprolu


Here it is in 5.1:

enter image description here

I thought I would add this screenshot as it took me some time to find it!

like image 23
Patrice Gagnon Avatar answered Sep 18 '22 15:09

Patrice Gagnon