swift 3触发容器视图内容更新

时间:2017-01-28 11:03:41

标签: ios swift swift3 uipageviewcontroller

我有一个包含容器视图的视图控制器。此容器视图用于显示UIPageViewController及其各种页面。 包含容器视图的视图还包含页面顶部的导航栏 - 其中包含页面控制项。

这是安排:Screenshot

运行时,我可以在绿色和蓝色视图控制器之间滑动,导航栏不会移动。如何更新页面控件以显示我所在的页面?

1 个答案:

答案 0 :(得分:0)

您应该使用UIPageViewControllerDataSource

func presentationCount(for: UIPageViewController)
func presentationIndex(for: UIPageViewController)