But you presumably know the width (i.e. the CollectionView width minus any 
insets), and you can calculate the height based on that with NSString or 
NSAttributedString boundingRect functions. Assuming you have a subclass for 
your CollectionViewCell, you can add a method to return your cell height based 
on its contents layout.

> On Mar 9, 2018, at 8:21 AM, Gary L. Wade <garyw...@desisoftsystems.com> wrote:
> 
> @Cosmo
> 
> My collection items contain label, so I don’t know the exact sizes before 
> hand.
> 

_______________________________________________

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