On Oct 4, 2013, at 11:35 AM, David Hoerl <dho...@mac.com> wrote:

> 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.

Do you mean the header/footerReferenceSize properties? If so I would think this 
would just work, since the flow layout will automatically size the width or 
height (depending on the scrolling direction) to fill the width or height of 
the collection view, allowing your container to just specify its sizes relative 
to the parent view size without needing to know the orientation.

But maybe I just don’t understand exactly what you are running up against?

> 
> 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/david.duncan%40apple.com
> 
> This email sent to david.dun...@apple.com

--
David Duncan


_______________________________________________

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