Nib files other than the main nib file must be loaded explicitly as the app runs. This can happen semiautomatically through the instantiation of an object that incorporates nib-loading behavior, such as a UIViewController (Chapter 19); or it can happen completely manually, through explicit nib-loading code that you write.
Let’s illustrate nib-loading code. To do so, we’ll need a second nib file in our project. We’ll also need an instance to act as the nib’s owner. To illustrate the procedure fully, we’ll start by creating a class whose sole purpose is to be instantiated so that this instance can act as the owner of the nib file as it loads:
We’ve now created files MyClass.h and MyClass.m declaring a class called MyClass. Next, we’ll make the nib: