• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSCollectionView's newItemForRepresentedObject Method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSCollectionView's newItemForRepresentedObject Method (From: "Carter R. Harrison" <email@hidden>)
 >Re: NSCollectionView's newItemForRepresentedObject Method (From: Gernot <email@hidden>)

  • Prev by Date: Re: copyCGLContextForPixelFormat
  • Next by Date: [OT] Re: programming in C++ ?
  • Previous by thread: Re: NSCollectionView's newItemForRepresentedObject Method
  • Next by thread: Long filename, short NSTextField...
  • Index(es):
    • Date
    • Thread