[英]IOS: Disable scroll of a superview in IOS
All I am working on a legacy code that does the following 我正在研究执行以下操作的旧版代码
I have tried the following solutions. 我尝试了以下解决方案。
Create a delegate protocol that parent VC implements and call the following function from the parent VC (which has a custom UIScrollView) that executes the following 创建父VC实现的委托协议,并从父VC(具有自定义UIScrollView)中调用以下函数,以执行以下操作
self.view.scrollEnabled=NO;
This option did not work for me either. 此选项对我也不起作用。 Is there any other way for me to do this?
我还有其他方法吗?
Present a child view controllers view fully with clear color . 呈现一个带有清晰颜色的子视图控制器完整视图。 Inside that view make a subview by doing like this " but only up to a specific location, leaving a height of 100 from the top."
在该视图内,可以像这样“创建子视图”,但只能到特定位置,离顶部的高度为100。 so nothing is touchable from the parent's view.
所以从父母的角度来看,没有什么是可以触及的。 Or do what ever your doing ,but when child is about to present disable parent controller view with user interaction enable to 'NO' or cover it with clear color view.When child is diss missed enable the parent controllers view or remove that cover view.
或执行您所做的任何操作,但是当子级将要呈现时,禁用父控制器视图,并且用户交互将其设置为“否”,或者用清晰的颜色视图覆盖它。当子级缺失时,请启用父控制器视图或删除该封面视图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.