Re: Stacking views
Re: Stacking views
- Subject: Re: Stacking views
- From: Jens Alfke <email@hidden>
- Date: Fri, 15 Feb 2008 08:10:04 -0800
On 15 Feb '08, at 4:08 AM, Gernot wrote:
NSCollectionView
This is almost perfect except that all subviews have the same size.
Overriding the layout mechanism to enable differently sized subviews
is less than trivial.
Huh, I wasn't aware of that restriction. Is it documented?
NSCollectionView is pretty much a black box, with very little
customizability, so the only way to change the layout would be through
gross hackery.
Using CALayoutManager
This will work for implementing the layout logic, but I will have to
do all the binding to the ArrayController with the represented Objects
myself, including selection, etc.
This seems like the best approach. My guess is that the binding stuff
won't be too hard. And then you can publish your code and make other
developers happy :)
Do keep in mind, though, that NSViews are pretty heavyweight; putting
large numbers into a window will cause performance problems. (I don't
have an exact value for "large numbers", though. 100 or more?) That's
the reason NSCell exists. (And CALayer; layers seem to be a lot
lighter weight, though I found that putting shadows on them makes them
much slower.)
—Jens_______________________________________________
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