Swift 3 在页面 View Controller 中嵌入按钮

标签 swift xcode uipageviewcontroller

我正在尝试设置一个具有嵌入式按钮的页面 View Controller (当页面 View 向左或向右滑动时,这些按钮不会移动,但始终可见)

我有标准 View Controller 、页面 View Controller 和另一个具有 ImageView 的 View Controller 。问题是,无论我将按钮放在哪里,它们都会移出屏幕,滑动后会重新出现新图像。

有没有办法嵌入它们,这样它们就不会在每次滑动时移动?

我什至尝试在第一个 View Controller 上放置嵌入式导航 Controller ,但没有成功。

感谢您的建议。

最佳答案

如果您不希望它们移动,则必须将它们放入包含 UIPageViewController 的 View Controller 中。因此它们只是按钮的一个实例(不是每一页都有一个)。

关于Swift 3 在页面 View Controller 中嵌入按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41086359/

相关文章:

ios - iPad3 中带有图像的 UIPageViewController 在内存中缓存所有 View Controller

swift - 为什么我的 PageViewController 的数据源不能正常工作?

ios - 是否可以在同一个项目中同时使用快速编码和 UI 界面 Storyboard来在 xcode 上构建应用程序?

objective-c - 如何将复选框值选中/取消选中保存到 NSUserDefault

ios - 单点触控 : How to add a two finger gesture recognizer to UIPageViewController?

ios - 使用gestureRecognizer从 super View 中删除

ios - react native 错误 ld : library not found for -lBVLinearGradient

ios - 父类(super class)的数组是否也包含子类?

ios - SwiftUI Init 方法不适用于 ObservedObject 声明

ios - collectionview 单元格操作复制中的 uibutton