Re: Building a panel with templated views?
Re: Building a panel with templated views?
- Subject: Re: Building a panel with templated views?
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sun, 31 Oct 2004 00:19:46 +0200
At 9:24 Uhr +1000 28.10.2004, Graham cox wrote:
So I created each line of items as children of a custom view in IB.
The question I have is how to take those and make instances as
needed at run time. I can easily get one instance of each type, but
it's unclear how to make clones - I need the custom view object from
IB to act as a template for numerous future instances rather than an
actual instance.
Basically, you have two choices:
1) copy your object using -copy (not sure that works for views and
their subviews, though, if you subclass you may have to implement
copyWithZone:)
2) put each custom view in its own NIB file. Then you can use the
NSBundle NIB loading methods to load a new copy of your views each
time.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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