Sizing NSCollectionViewItems to fit


Steve Mills
 

I'm doing the development of a small app on 10.10, so all the 10.11 additions to NSCollectionView aren't available. I have a window filled with an NSCollectionView in a scrollview, which contains 1 row and scrolls horizontally, and I'd like to resize the NSCollectionViewItems (which are subclassed) to proportionally fit the height of the collection view at the time of being inserted and when the window resizes.

I tried changing the bounds of the itemPrototype in a notification for the collection view's frame being changed, but that's probably not all that needs to happen. Any ideas?

Sent from iCloud's ridiculous UI, so, sorry about the formatting

Join {cocoa@apple-dev.groups.io to automatically receive all group messages.