Re: Multiple NSViews
Re: Multiple NSViews
- Subject: Re: Multiple NSViews
- From: "I. Savant" <email@hidden>
- Date: Fri, 11 Apr 2008 09:10:48 -0400
On Fri, Apr 11, 2008 at 8:55 AM, Lorenzo <email@hidden> wrote:
> I have defined an NSView "info view" on IB.
> This view contains several NSTextFields.
> Now I want to programmatically create copies of this view and attach them to
> the objects on my window. So if on my window I have 10 objects, I should see
> the 10 objects, each one having its "info view". Each view reports
> information about each object on the screen.
> What's the best way to do that?
If you're targeting Leopard, you could always use NSCollectionView -
it's perfectly suited for what you're trying to do (so long as the
views are of homogenous size).
Otherwise, it's easiest to put your view in its own separate nib,
then load an instance in each time you need it.
http://cocoadevcentral.com/articles/000064.php
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden