我找到了这个线程,但是它并不能反映我的情况:Disable gesture to pull down form/page sheet modal presentation

我有这个问题:我的应用程序通过表单格式的模式演示打开了一个小视图控制器。给出了一个包含静态tableviewcontroller的navigationcontroller,在唯一的单元格内,我有一个视图通过“touchesBegan”和“touchesMoved”捕获签名。

ios - iOS13/iPadOS13模态视图 Controller 自动滑动以消除捕捉触摸的中断 View-LMLPHP

当我尝试绘制签名时,视图控制器会捕获触摸,尝试将其关闭。

显然我已经激活了属性“modalInPresentation”

我如何找到对此负责的gestureRecognizer?

self.view.gestureRecognizers He gives me these back, but nobody seems to intercept the gesture of dismiss:

<UIScrollViewDelayedTouchesBeganGestureRecognizer: 0x280ac8800; state = Possible; enabled = NO; delaysTouchesBegan = YES; view = <UITableView 0x10711a000>; target= <(action=delayed:, target=<UITableView 0x10711a000>)>>
<UIScrollViewPanGestureRecognizer: 0x105bfe170; state = Possible; enabled = NO; delaysTouchesEnded = NO; view = <UITableView 0x10711a000>; target= <(action=handlePan:, target=<UITableView 0x10711a000>)>>
<UIScrollViewKnobLongPressGestureRecognizer: 0x105b9b270; state = Possible; view = <UITableView 0x10711a000>; target= <(action=_handleKnobLongPressGesture:, target=<UITableView 0x10711a000>)>; numberOfTapsRequired = 0; minimumPressDuration = 0.1>
<UIScrollViewKnobLongPressGestureRecognizer: 0x105b9b440; state = Possible; view = <UITableView 0x10711a000>; target= <(action=_handleKnobLongPressGesture:, target=<UITableView 0x10711a000>)>; numberOfTapsRequired = 0>
<UIHoverGestureRecognizer: 0x112fb7f60; state = Possible; view = <UITableView 0x10711a000>; target= <(action=_handleKnobHoverGesture:, target=<UITableView 0x10711a000>)>>
<_UIDragAutoScrollGestureRecognizer: 0x28098ec10; state = Possible; cancelsTouchesInView = NO; delaysTouchesEnded = NO; view = <UITableView 0x10711a000>; target= <(action=_handleAutoScroll:, target=<UITableView 0x10711a000>)>>
<_UISwipeActionPanGestureRecognizer: 0x105be9d00; state = Possible; view = <UITableView 0x10711a000>; target= <(action=_swipeRecognizerDidRecognize:, target=<_UISwipeHandler 0x281896b00>)>>
<_UISwipeDismissalGestureRecognizer: 0x280ac8d00; state = Possible; enabled = NO; delaysTouchesBegan = YES; view = <UITableView 0x10711a000>; target= <(action=_dismissalRecognizerDidRecognize:, target=<_UISwipeHandler 0x281896b00>)>>

最佳答案

应该是这个

<UIDropShadowView: 0x10521faf0; frame = (0 40; 375 627); gestureRecognizers = <NSArray: 0x2803a5f50>; layer = <CALayer: 0x280de8e00>>
(lldb) po [self.view _parentDescription]
<UIView: 0x10521dac0; frame = (0 0; 375 627); autoresize = W+H; gestureRecognizers = <NSArray: 0x2803a5bc0>; layer = <CALayer: 0x280de87c0>>
    <UIView: 0x105220880; frame = (0 0; 375 627); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x280de8d40>>
        <UIView: 0x105220380; frame = (0 0; 375 627); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x280de8d60>>
            <UIDropShadowView: 0x10521faf0; frame = (0 40; 375 627); gestureRecognizers = <NSArray: 0x2803a5f50>; layer = <CALayer: 0x280de8e00>>
                <UITransitionView: 0x10521f540; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x280de8d20>>
                    <UIWindow: 0x105106ac0; frame = (0 0; 375 667); autoresize = W+H; gestureRecognizers = <NSArray: 0x2803ad230>; layer = <UIWindowLayer: 0x280ded800>>

关于ios - iOS13/iPadOS13模态视图 Controller 自动滑动以消除捕捉触摸的中断 View ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/61403892/

10-13 03:57