- File's Owner: This is the object that loads the xib file. In a completely generic sense, this is the object passed as the owner parameter to
-[NSBundle loadNibNamed:owner:]
. When working with a nib for aUIViewController
subclass, this is usually theUIViewController
subclass itself. Further reading: Resource Programming Guide: Nib Files
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 proxy 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. The reason this object is so important is that it is the main
link between your application code and the contents of the nib file. More specifically, it is the controller
object that is responsible for the contents of the nib file.
In Interface Builder, you can create connections between the File’s Owner and the other interface objects in
your nib file. When you load the nib file, the nib-loading code recreates these connections using the
replacement object you specify. This allows your object to reference objects in the nib file and receive
messages from the interface objects automatically.
- First Responder: This is the view that receives untargeted events (i.e. those sent with a target of
nil
) first. The useful part of this is that it's connected to the idea of the responder chain, which is a mechanism by which things higher up in the view hierarchy can capture unhandled and deal with them. This concept originated on the Mac, and is particularly useful for implementing something like the "Copy" menu item. The first responder is the target of the "Copy" menu item, meaning that the selected text field gets a chance to handle the copy event first, then its superview, and so on. Further reading: iPhone Application Programming Guide: Event Handling - Application Delegate: This is simply the delegate of the application's
UIApplication
object. It typically receives general status messages about the application, such as when it starts, ends and what not. It's a good spot to kick off things that need to happen when your app starts or shuts down. Further reading: Cocoa Fundamentals Guide: Delegates and Data Sources