Re: loading nib within a nib
Re: loading nib within a nib
- Subject: Re: loading nib within a nib
- From: Carlos Weber <email@hidden>
- Date: Mon, 24 Dec 2001 07:05:22 -1000
On Monday, December 24, 2001, at 12:18 , Alex Reynolds wrote:
How would one go about loading a custom nib or view inside a window, on
demand?
I have an application where I would like to change the appearance of
the window (controls and such) depending on the context of the selected
(or active) item.
I do not want to load the nib into a seperate window.
Any sample code or pointers are greatly appreciated.
In Interface Builder, you can use a _view_ instead of a window as a
top-level object which contains a hierarchy of other subviews, controls,
buttons, etc. Such a view can then be designated as your window's
contentView. You can create this view hierarchy in the same nib as the
window you want to swap it into, or in a separate nib if you want to
load it lazily (see the SimpleMultiWindow example in the Dev Tools
installation for how to do that).