I used a UICollectionView in an iPad app. But the NSCollectionView is very 
similar. The only difference I can tell is that, when you drag a collection 
view onto your view controller view, you get contentArray layout type. But, if 
you switch to “Flow”, you will automatically get a collection view flow layout. 
That’s what I used from my view controller to resize the collection view cells 
inside the collection view by setting the item size properties. There is a 
little bit of math to do since you need to take into account the items spacing 
but that is not very hard. On iOS, you don’t have any choice in the layout of 
the UICollectionView.

-Laurent.
-- 
Laurent Daudelin                                                        
laur...@nemesys-soft.com <mailto:laur...@nemesys-soft.com>
AIM/iChat/Skype:LaurentDaudelin                                 
http://www.nemesys-soft.com/ <http://www.nemesys-soft.com/>
Logiciels Nemesys Software

> On Oct 20, 2016, at 13:47, Steve Mills <sjmi...@mac.com> wrote:
> 
> I have an NSCollectionView whose items' size are dependent on a zoom slider, 
> with the largest zoom fitting 1 item within the width or height of the 
> enclosingScrollView. What's the best way to cause the items to resize as a 
> result of the NSCollectionView being resized (caused by window resize, 
> enclosing splitter resize, etc)? Maybe set up a notification handler for 
> NSViewFrameDidChangeNotification on the NSCollectionView's 
> enclosingScrollView? Or is there something in the massive collection of 
> collection and layout classes that would be better? I looked through it all, 
> but nothing makes sense for this.
> 
> --
> Steve Mills
> Drummer, Mac geek
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/laurent%40nemesys-soft.com
> 
> This email sent to laur...@nemesys-soft.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to