简体   繁体   English

如何在页面视图中禁用用户滑动,但仍启用与页面视图中子视图的交互。 前按钮

[英]How to disable user swiping in page view but still enable interaction with the subviews in the page view. e.x. button

I want to disable users being able to swipe through page view controllers in swift but every method I try it also disable's any interaction with the subviews in the page view controller such as a button and being able to interact with a table view controller. 我想禁止用户能够快速浏览页面视图控制器,但是我尝试的每种方法也都禁止与页面视图控制器中的子视图(例如按钮)进行任何交互,并且不能与表视图控制器进行交互。

How would I approach this project. 我将如何处理这个项目。

尝试这个:

self.navigationController!.interactivePopGestureRecognizer!.enabled = false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ios-隐藏视图,但仍在其上启用用户交互 - ios - Hide a view but still enable user interaction on it iOS暂时禁用页面视图控制器刷卡 - iOS temporarily disable Page View Controller swiping 如何在基于页面的应用程序中的视图中禁用页面滑动 - how to disable swiping of pages in a view in page based application 如果我在uicollection视图的最后一页,如何转到下一个视图控制器。 其水平过渡和分页已启用 - How to go to next view controller if i am at last page of uicollection view. its horizontal transition and paging is enable 禁用透明视图上的交互,而不会影响其子视图和按钮 - Disable interaction on transparent view without affecting its subviews and buttons 在视图及其子视图上启用VoiceOver - Enable VoiceOver on the view and it subviews 禁用根视图交互并一次启用子视图交互 - Disable Root view interaction and Enable subview interaction at a time 如果在另一个视图下方,则禁用按钮交互 - Disable button interaction if below another view 使用iOS 7的Xcode 5中的NSInternalInconsistencyException:'故事板:容器视图中有意外的子视图。 - NSInternalInconsistencyException in Xcode 5 with iOS 7: 'Story Board: There are unexpected subviews in the container view.' 页面视图控制器显示添加子视图后的上一个视图控制器 - Page View Controller showing previous view controller after adding subviews
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM