Re: Using an IB-built view multiple times
Re: Using an IB-built view multiple times
- Subject: Re: Using an IB-built view multiple times
- From: John Bishop <email@hidden>
- Date: Wed, 21 Sep 2005 08:48:47 -0500
You need to look at the MultipleNibTabView sample code. It shows you nicely
how to repeatedly use the same (or different) nib files to populate views -
which in its case is a tab view. It'll work any way you wish to use it.
The bindings are not a problem either... since the nib contains a controller,
along with the view, you can just wire up the content to your model after
loading the nib and installing the view into your master view. Each view can
therefore represent a different instantiation, with its own contrller, of the
same class. You usually need to keep track of something (the controller, the
view or some controller of your own) so you can free it when it goes away, but
that's not too hard.
Christopher Drum <email@hidden> said:
>No, I'm sorry if my original explanation was confusing. I mean, I
>want to build a view in IB, then use that view repeatedly to populate
>some master view programatically. I have found an example of this in
>some sample Apple code in the CoreRecipes application. There is an
------------------------------------------------------------------
John Bishop <mailto:email@hidden>
Mulligan Software <http://www.mulligansoftware.com>
Mulligan's Golf Personal - Stats & Handicapping for the Mac Golfer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden