-2
UIPageViewControllerDelegate斯威夫特,如何獲取當前顯示控制器UIPageViewController
func pageViewController(_ pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool) {
let viewer = pageViewController.childViewControllers[0] as! KKPhotoViewerController //So I got controller is a constant
print(pageViewController.childViewControllers)
print(previousViewControllers)
photos.selectedIndex = viewer.photoIndex
currentViewer = viewer
}
歡迎計算器!請參考這個stackoverflow.com/help/how-to-ask –
像這樣我會去控制器目前沒有顯示 –