简体   繁体   English

UIScrollView窃取其他视图

[英]UIScrollView steal touches of other views

Hi have the following view hierachy: 嗨,您有以下视图hierachy:

在此处输入图片说明

The vertical UIScrollview scrolls if UserInteractioEnabled=NO in the ContainerView but then I can't press the buttons or scroll the horizontal scrollview that is inside. 如果ContainerView中的UserInteractioEnabled = NO,则垂直UIScrollview滚动,但是我不能按按钮或滚动其中的水平滚动视图。 On the other hand if UserInteractionEnabled=YES in the Container View I can press the buttons and scroll the horizontal but not scroll the vertical view. 另一方面,如果在容器视图中UserInteractionEnabled = YES,则可以按按钮并滚动水平视图,但不滚动垂直视图。 How can I solve this? 我该如何解决?

尝试将canCancelContentTouches属性设置为滚动视图的NO。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM