制作一个属于 UIPageViewController 的工具栏
Make a toolbar that is part of a UIPageViewController
我一直在实施 UIPageViewController
并想在我的 UIPageViewController
底部添加一个包含 3 个按钮的工具栏。可悲的是,我不知道该怎么做,因为我只能将工具栏放在 UIViewController
之一上,当我转换到另一个视图控制器时,工具栏不再存在。是否可以创建一个横跨嵌入 UIPageViewController
的所有 UIViewController
的工具栏?
提前致谢。
编辑:我已经实现了我的 UIPageViewController,并在 UIPageViewController 中添加了两个 UIViewController。还有可能吗?也许可以将我已经创建的 UIPageViewController
嵌入 UIVIewController
?
创建 UIViewController 并在其中添加 UIPageViewController
。在 UIViewController
上添加该工具栏。添加 UIPageviewcontroller
后,将子视图置于该工具栏的前面。
因此您的视图层次结构将是 UIViewController
> UIPageviewcontroller
> Toolbar
。
当您的工具栏被添加到 UIViewController 上时,它将显示在所有页面viewcontroller 的viewcontroller 的上方。
我一直在实施 UIPageViewController
并想在我的 UIPageViewController
底部添加一个包含 3 个按钮的工具栏。可悲的是,我不知道该怎么做,因为我只能将工具栏放在 UIViewController
之一上,当我转换到另一个视图控制器时,工具栏不再存在。是否可以创建一个横跨嵌入 UIPageViewController
的所有 UIViewController
的工具栏?
提前致谢。
编辑:我已经实现了我的 UIPageViewController,并在 UIPageViewController 中添加了两个 UIViewController。还有可能吗?也许可以将我已经创建的 UIPageViewController
嵌入 UIVIewController
?
创建 UIViewController 并在其中添加 UIPageViewController
。在 UIViewController
上添加该工具栏。添加 UIPageviewcontroller
后,将子视图置于该工具栏的前面。
因此您的视图层次结构将是 UIViewController
> UIPageviewcontroller
> Toolbar
。
当您的工具栏被添加到 UIViewController 上时,它将显示在所有页面viewcontroller 的viewcontroller 的上方。