Skip navigation.
 
mlRe: NSCollectionView's newItemForRepresentedObject Method
FROM : Scott Anguish
DATE : Sun Feb 03 18:50:52 2008

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.

Related mailsAuthorDate
mlNSCollectionView's newItemForRepresentedObject Method Carter R. Harrison Feb 3, 14:14
mlRe: NSCollectionView's newItemForRepresentedObject Method Gernot Feb 3, 14:32
mlRe: NSCollectionView's newItemForRepresentedObject Method Scott Anguish Feb 3, 18:50