Question

I have a UIPageViewController embedded in a ContainerView.

I have three views for this UIPageViewController: First is green, second is orange, third is blue. If I'm on first screen and want to go left, there is a bouncing effect. Same for last screen if I want to go right.

This is not a problem for me, but I wonder how to deactivate it? There is no bounce parameter on the UIPageViewController ...

More, if I'm on screen 1 (green) and try to go right very quickly, I get to screen 2 (orange), and there is also a bounce, but instead of seeing the beginning of screen 3 (blue) I see a bit of the background (white). The effect is not nice.

Here is a sample project to show my problem: http://d.pr/f/QVXK

In short: is there a way to

  • totally disable bouncing for UIPageViewController
  • disable bouncing only between views of UIPageViewController but keep it for first and last view ?

Thanks a lot, hope I'm clear enough !

P.S. I also tested https://github.com/ykyuen/ScrollViewWithPaging and I don't see the same thing... Is that because they instantiated all the views at first in an array, and my app just instantiates it when needed?

Was it helpful?

Solution

actually the code(at gitHub) you are giving does not using UIPgeviewController its just representation of scrollview as page view even you can see that this code is not using dataSource function of pageiew controller and one more thing i want to say that whatever you are doing in your code is logical and rest of things are depending on the need. may be you can use that code in your project if you want to do.

what ever you are doing is just a feature of UIPageViewController. UIPageViewController showing as the same way you see.

if you want to remove that bouncing you can use UIPageViewControllerTransitionStylePageCurl style

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top