Re: NSCollectionView's newItemForRepresentedObject Method
Re: NSCollectionView's newItemForRepresentedObject Method
- Subject: Re: NSCollectionView's newItemForRepresentedObject Method
- From: Scott Anguish <email@hidden>
- Date: Sun, 3 Feb 2008 09:50:52 -0800
On Feb 3, 2008, at 5:32 AM, Gernot wrote:
Hi,
Correct me if I'm wrong, but I think the point of NSCollectionView
is that
each subview has the same size. So it takes the Prototype view or
the view
it gets from -newItemForRepresentedObject and resizes it to the
current
size. That makes positioning the views a lot faster; it's a little
bit like
NSMatrix in that regard.
For differently sized views, you would have to subclass
NSCollectionView and
override its (private) subview positioning methods. Or get rid of
NSCollectionView and make your own view using a custom
CALayoutManager.
There is no direct way to use CALayoutManager with a view. And if
you're just dealing with a one-dimensional list of items that are
butted up against each other, CALayoutManager is probably overkill.
_______________________________________________
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