How to get variably sized header in a UICollectionView supporting both orientations
How to get variably sized header in a UICollectionView supporting both orientations
- Subject: How to get variably sized header in a UICollectionView supporting both orientations
- From: David Hoerl <email@hidden>
- Date: Fri, 04 Oct 2013 14:35:43 -0400
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 (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