in sampleapp-ios-swift/RootViewController.swift [47:54]
func pageViewController(_: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? {
let index = services.firstIndex(of: viewController.restorationIdentifier!)
if (index == 0) || (index == NSNotFound) {
return nil
} else {
return storyboard?.instantiateViewController(withIdentifier: services[index! - 1])
}
}