3 ms·
The nib is a data file - XML while developing, binary when shipping - that defines a bunch of views and how to connect them to a particular controller. That's i
by xsmasher 16y ago
The nib is a data file - XML while developing, binary when shipping - that defines a bunch of views and how to connect them to a particular controller. That's it, that's all. You usually write the controller first, in code, and define certain "outlet" pointers in the interface of that controller.
Now in the nib you say "here are three buttons, connect them to outlets a, b, c." Now when Someone asks the controller for it's view it will create the views and connect the pointers in the manner you requested.
There is "magic" taking place, but no more so than the interaction between HTML and JavaScript in a web page. It may be unfamiliar at first, but not unfathomable.