简体   繁体   English

ScrollView-将触摸发送到下面的视图

[英]ScrollView - Send Touches to View below

My setup - and I cannot change it - is right now: 我的设置-我无法更改它-现在:

Root View 根视图
- UIView -UIView
-- ScrollView2 -ScrollView2
- ScrollView1 (this is top in view hierarchy) -ScrollView1(这是视图层次结构的顶部)

The first scrollview is used to apply some transitions on the below UIView. 第一个scrollview用于在下面的UIView上应用一些转换。 The second scrollviews contentoffset (captures in scrollViewDidScroll:) is used to apply other animations. 第二个scrollviews contentoffset(scrollViewDidScroll中的捕获)用于应用其他动画。

Question: How can I transfer/delegate all touches from ScrollView1 to ScrollView2? 问题:如何将所有触摸从ScrollView1转移/委托给ScrollView2? Please note that the ScrollView1 is on top of everything and the others views are below of it - not subviews! 请注意,ScrollView1位于所有内容的顶部,其他视图位于其下方 -而非子视图!

You can add the pan gesture recogniser from a scroll view to any other view you want and this will effectively delegate the touches from the targeted view to the scroll view. 您可以将滚动视图中的平移手势识别器添加到所需的任何其他视图中,这将有效地将触摸从目标视图委派给滚动视图。 You can also add the pinch gesture recogniser if you want to control zoom. 如果要控制缩放,也可以添加捏捏手势识别器。

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

相关问题 将ScrollView中的Touches传递给下面的CollectionView - Pass Touches from ScrollView to CollectionView below UIView alpha = 0会将触摸删除到下面的视图中 - UIView alpha = 0 causes touches to be dropped to the view below 在scrollView的自定义视图中进行触摸缩放。 touchesMoved未调用 - Zoom with touches in a custom view in a scrollView. touchesMoved not called 如何在滚动视图中获取uiimage视图的样式并执行一些操作 - how to get touches of uiimage view in scrollview and perform some action 如何知道UIScrollView触摸顶部scrollView是否与另一个View的CGPoint相交 - How to know if UIScrollView touches on top scrollView intersects with a CGPoint of another View 将触摸通过视图传递给视图下方的正确方法是什么? - What is the correct way to pass touches through a view to those below it? 触摸开始不适用于scrollView - Touches began not work with scrollView 如何将模态视图控制器中的触摸发送到父视图控制器? - How to send touches in modal view controller to parent view controller? 如果在滚动视图下面有一个视图,则调整滚动视图缩进不起作用 - Adjust scroll view indents doesn't work if there is a view below the scrollview 禁用视图上的触摸 - Disable Touches on a view
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM