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

swift 3 trigger on container view contents update

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

这是安排:

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

你应该使用 UIPageViewController 数据源

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