• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to get variably sized header in a UICollectionView supporting both orientations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to get variably sized header in a UICollectionView supporting both orientations
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: why isn't id<MyCellDelegate> an id?
  • Next by Date: Re: How to get variably sized header in a UICollectionView supporting both orientations
  • Previous by thread: Re: Doc Viewer in 5.0.1
  • Next by thread: Re: How to get variably sized header in a UICollectionView supporting both orientations
  • Index(es):
    • Date
    • Thread