
The are files with .xib extension. They used to be .nib, but now they are written in XML so the extension was changed to .xib.
Manipulated with the Interface Builder application
Got V (view) think IB (interface builder)
- Used to layout components on view
- adds controller objects
- Also connects the controller and the UI
Views built in Interface builder
Controllers can be in Interface Builder or in Xcode
Draw arrows from instance variables in controller to components in the UI
Also drag arrows from UI components to different methods in the Controller
After the NIB has been loaded by the application all elements that have a awakeFromNib() method are invoked. From here you can do any customization you want to do as part of initialization. NOTE: these are only those objects that were created from a NIB archive.
- (void)awakeFromNib {
[super awakeFromNib];
// do my customization here.
}
Remember:
- OUTLETS are the members of the Controller that correspond to UI elements
- UI Elements may be connected ot actions within the Controller
The NIB has serialized version of the objects it represents. So when it is loaded into the application, objects are not actually being created/instantiated they are, instead, being brought from a serialized state to a deserialized/live/in-memory state.
No comments:
Post a Comment