1

enter image description here

Hi, what you see in the image is a pageviewcontroller which instantiates viewcontrollers with a scrollView for zooming an imageView. At the bottom you see partly a textView in blue.

You may have noticed the gap between the top navigationBar and the top of the image. The bottom part of the image is hidden behind the tabBar and the textView is partly out of the screen.

This happens only on iOS10 and only when the first item is instatiated. As soon as I swipe to the next image, the current viewControllers position is suddenly corrected up.

When debugging the views of wrong positioned and correct positioned the y-values are the same o.O. I tried several combinations of layoutIfNeeded or layoutSubviews or layer.setNeedsLayout etc ... at different stages. Nothing changed the behaviour :(

I appreciate every workaround. Thank you!

Max Power
  • 143
  • 9

2 Answers2

1

Un-chek the "under the bottom bars" from storyboard:

enter image description here

Jogendar Choudhary
  • 3,241
  • 1
  • 9
  • 23
1

In my case, this was solved by adding automaticallyAdjustsScrollViewInsets to false on the UIPageViewController.

See: https://stackoverflow.com/a/19989136/165783

James
  • 3,119
  • 1
  • 30
  • 37