I have been working on a project where I needed to show list of images with zoom / swipe feature as presented view modal. I created custom ImageViewer using
I had a very similar issue and the way i fixed it was select the view being added to the UIPageViewController in the storyboard and selected the pin options. Below in the image you can see the Constrain to margins options, make sure you unselect that. Also when choosing what view to pin it to make sure you select the superview and not the Top Layout Guide. 