I have UIPageViewController
that Contains 4 view Controllers
I set the timer for changing view controllers automatically(going to the next view control
Try this:
You can change view controller by index of VCArr.
var index = 0
func changeSlide() {
index + 1
if index < self.VCArr.count {
setViewControllers([VCArr[index]], direction: .forward, animated: true, completion: nil)
}
else {
index = 0
setViewControllers([VCArr[0]], direction: .forward, animated: true, completion: nil)
}
}