Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
630
IGGridView and AutoLayout Doesn't Rotate Well
posted

To summarize, I'm using an IGGridView with AutoLayout in iOS 7 (with correct constraints set to expand to screen) and notice that when I rotate from Portrait to Landscape, the grid does not completely expand horizontally (vertically is fine) to fill the remaining space. However, if I use switch back to Springs/Struts, it works fine. This behavior happens both when using the data source helper, or when implementing the datasource protocols myself.

The only way I can get the grid to fully expand with AutoLayout is to override the didRotateFromInterfaceOrientation and viewDidAppear methods and send an updateData call to the grid. But that isn't smooth and you can really see the grid snap back to fill the remaining space post rotate.

Is there anything I am missing when using AutoLayout and rotation?

Here are some basic steps I took:

  1. Make sure xib is using Auto Layout.
  2. Drag UIView to Interface Builder. Change class to IGGridView.
  3. Set constraints to have 0 leading/trailing space to super view, same for top/bottom.
  4. Startup in portrait mode, looks great.
  5. Rotate to landscape...
  6. You can see that the line separators correctly filled the extra horizontal space, but the actual column headers and text still remain the size of the portrait bounds.
    1. I removed any theming I had and notice that when rotated to landscape, the line separators also do not expand, but are aligned left (which is why I thought they had expanded), whereas everything else is aligned right, and everything not expanding to the entire horizontal space)
  7. Only if I call updateData() in the new orientation does the grid snap (not smooth) to fill remaining horizontal space.

Thanks.

Parents
No Data
Reply
  • 9298
    Verified Answer
    posted

    Jeff,

    I have submitted this issue to our development team for further review.  The reference number for this item is 167912.  A support case has also been opened for you with reference number CAS-133670-R4Y3J8.  You will receive more information on this case through the support case.  Please let us know if you would like us to provide you with a private build when this issue has been resolved.

Children
No Data