I trying to implement page view controller with three pages. I already did it, it works very well on iPhones with 3.5- and 4-inch displays, but something wrong happens with 4.7- and 5.5-inch displays.
I found that hiding of standard Page Control of UIPageViewController is reason of this bug: when page control gets hidden the view of UIPageVC changes his height (+ height of Page Control View).
My page content view controllers has constraints for background image view to fit to all sizes.
This is first page:
This is second page:
This is third page, ok, we've reached last page:
But look what happens when we return to the second page (View of page content controller fully moved at few pixels to the left):
Swipe to the first page - the same result:
BUT! Look what we have when after the first page we go to the second page! Now view of page content controller at the right position by x:
Go to the last page:
Let's come back to the second page! Holy ****! View gets moved by something again:
Go to the first page, all in the 'right' (BAD) positions:
Go back to the second page from first page. All in the good and right positions:
So, my question is what is going on with this UIPageViewController? I thought that my constraints gets broken but I have nothing in my logs about it, in storyboard there are no error related to constraints.
When I use two methods "presentationCountForPageViewController:, presentationIndexForPageViewController:" all is good but above the button appears a white line of height equal to Page Control view's height (so, I need to hide it by erasing two methods listed above).
Thanks in advance for you future suggestions!