Re: Multiple Nibs
Re: Multiple Nibs
- Subject: Re: Multiple Nibs
- From: "M. Uli Kusterer" <email@hidden>
- Date: Thu, 11 Nov 2004 13:24:18 +0100
At 20:56 Uhr -0500 10.11.2004, Colin O'Connor wrote:
I've created a custom NSImageView, and I'd like to be able to create a
variable number of instances of this subclass. As in, programmatically, I'd
like to create and position this NSImageView subclass on-the-fly.
I'm under the impression that to accomplish this, a separate nib file is
needed. Is that true? And if so, how would it be done?
No, if it's just a subclass, you don't need any NIBs at all. Just
create a new view just like any other object, by doing [[MyClass
alloc] initWithFrame: box] and then doing an addSubview: to add it to
the window's content view or any other superview you want.
--
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
References: | |
| >Multiple Nibs (From: "Colin O'Connor" <email@hidden>) |