2

I have a UIPageViewController and it works great. I can move all the pages. The thing is when Its at the first page and the last page and I try to drag more, the UIPageViewController bounce a little. I don't want this. How can I do this?

How it looks now:

http://s23.postimg.org/r4ud9y76z/Screen_Shot_2557_08_24_at_10_55_28_AM.png

How I want it to look like when no more pages when dragging:

http://s17.postimg.org/7w2mqb2f3/Screen_Shot_2557_08_24_at_10_55_36_AM.png

1 Answers1

0

Disable bounce effect in UIPageViewController:

for (UIView *view in self.pageViewController.view.subviews ) {
        if ([view isKindOfClass:[UIScrollView class]]) {
            UIScrollView *scroll = (UIScrollView *)view;
            scroll.bounces = NO;
        }
}
Ty Lertwichaiworawit
  • 2,950
  • 2
  • 23
  • 42
  • This disables pan gestures too. Check this out: http://stackoverflow.com/questions/21798218/disable-uipageviewcontroller-bounce – sig Jul 31 '15 at 14:44