Using UIPageViewController with swift and multiple view controllers

后端 未结 3 1034
心在旅途
心在旅途 2020-12-02 14:09

I\'m trying to utilize a UIPageViewController in a Swift app with multiple view controllers. I have 2 view controllers on my storyboard (firstViewControll

3条回答
  •  借酒劲吻你
    2020-12-02 14:33

    Please be aware that this code will only work with two ViewController. If you are planning on using more you have to change the line:

    self.index = self.index + 1
    

    Found at the before and after call, to:

    self.index = index + 1
    

    To call the current ViewController index.

提交回复
热议问题