Search code examples
iosswiftxcodeuipageviewcontroller

Page View Controller Button Over All Views


How can I add two buttons over all views in a page view controller. If I were to add them to each view separately, each swipe causes the buttons to be reloaded.

Is it possible to have buttons static over all views in a PageViewController, or would I need a container view with a page view controller inside?


Solution

  • It's just like any scroll view: pin the buttons to the frame of something outside the page view controller's scroll view. The page view controller's own view would do, or the window, or whatever.

    enter image description here