What exactly does the File's Owner and First Responder Placeholder in Xcode represent?
2 Answers
Files Owner and First Responder are proxies for objects that will exist at runtime. Specifically, Files Owner represents the object which will be passed in for owner in the method [NSBundle loadNibNamed: owner]. You can specify, via the Attributes Info Panel, what kind of object owner will be. Once you've indicated what Files Owner is, you can make connections to it.
First Responder is your portal to the Responder Chain. You can add Actions to First Responder in the "Classes" tab of the document window. Next, connect buttons and menu items to First Responder so that they call the desired action. The first object in the responder chain that understands this action will be called.
See the Cocoa documentation for more information about how the responder chain works.

- 10,326
- 6
- 32
- 51
-
What is the recommended target for actions coming from elements like buttons? In IB I can connect the button action for touches to the same method either from File's Owner -or- First Responder. Why would I pick one over the other, in case I decide to change the First Responder programmatically later? – Michael Jun 29 '11 at 18:40
File's owner is the class which governed all the functionality for a xib.
First responder is a control which having focus for input or any kind of signal.(basically textfields becomes first responders).
Edit:
Files owner shows the class which having all links for all UIContol their delegate and datasource as well as their events.
-Files owner having all the IBOutlets for connecting with UI contols. -Files owner having all IBActions perform on certain events related with UIControls. -Represent by self(object for the current class). -Set delegate and datasource to self if you connect these with files owner.

- 12,797
- 5
- 35
- 51
-
can you explain File's Owner a bit more? I'm still confused as to what it is and controls in the xib file. – locoboy Apr 11 '11 at 07:10