Frame Shift iPhone 6+

I have a ScrollView created with what I figured out is the only way to get it to behave using autolayout:

View (UIView *)
 -> ScrollView (UIScrollView *)
     -> ContentView (UIView *)


I have a ScrollView bounded by the bounds of its appearance and the ContentView is bound to the ScrollView so that when it grows the ScrollView does that too. I also have an Equal Widths constraint from the ContentView to the appearance to ensure it grows to its maximum width (thanks iPhone 6 / +!)

Now: with iPhone 6+ and above setup, I have a problem where some time after watching WillAppear the frame is not set correctly. Instead of (0 0; 414 672), as I might expect, I get (4 0; 406 672). X comes in and the width is not set to the theoretical maximum (per my width limit). All other devices on the XCode Simulator function as expected (4, 5, 5s, 6) with the ScrollView filling the screen.


source to share

All Articles