Becoming increasingly adept at autolayout but currently stumped. What I am trying to do is design a UICollectionView header that using constraints is suitable for portrait and landscape.

I have a bunch of views in it, each grouped into a container view. What I'd like to do is when the view rotates, move the container views around. Currently this seems impossible because the size of the header (and footer) must be specified to the Flow Layout before the view is even created, and it appears to be fixed from them on.

As it stands now, what I'm doing is creating the header in code, and using knowledge of what orientation the view will be shown in, and varying the constraints on the container views. By reloading the collection view on every rotation, I can get a new (and properly) sized header.

This seems like driving a nail with a sledgehammer, but nothing else comes to mind. Very open to suggestions on better methods.

David
_______________________________________________

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