0

I am using a UIPageViewController. I want to be able to drag in between views, which works, but currently I am able to drag the entire controller away from the screen, which I do not want.

See here:

enter image description here

I am launching this UIPageViewController from my home screen view controller as such:

    let onboardingVC = OnboardingPageViewController()
    onboardingVC.modalPresentationStyle = .overFullScreen
    self.navigationController?.present(onboardingVC, animated: true)

In case this is causing the problem. I can share the PageViewController code if its needed.

If I use this answer: Disable UIPageViewController bounce

I get this:

enter image description here

As you can see during the scroll I can still sometimes view the background. Any thoughts on how to fix this?

AlexK
  • 336
  • 8
  • 21
  • 41
  • Does this answer your question? [Disable UIPageViewController bounce](https://stackoverflow.com/questions/21798218/disable-uipageviewcontroller-bounce) – ZGski Dec 05 '19 at 22:28
  • Not really. I just implemented what is in here, and it works in terms of not showing the below view when I am at my left or rightmost view in the PageControl, but I still can see the drag in between views. It's also incredibly hacky.. calculating the view and comparing to the bounds.. – AlexK Dec 05 '19 at 23:02
  • 1
    I would suggest implementing your own page controller using a scroll view and disabling the horizontal bounce. The default page controller is not very flexible. – EmilioPelaez Dec 05 '19 at 23:20

0 Answers0