If you want to reload the ViewControllers inside the UIPageViewController, just re-set them with:
pageViewController(pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool)
if you are going to update your viewControllers from inside a viewController, you have to call it this way:
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
let viewControllers: [UIViewControllers] = [UIViewController()]
if let pageViewController = parentViewController as? UIPageViewController {
pageViewController.setViewControllers(viewControllers, direction: .Forward, animated: true, completion: nil)
}
}
UIPageViewController
" an "IBOutlet
" in your view controller? Is your "UIPageViewController
" subclassed? – AnimalitysetViewControllers:direction:animated:completion:
function to load the view controllers for the page(s) you want to reload. – Touraine