Prevent tap event on UITextView

后端 未结 1 678
难免孤独
难免孤独 2021-02-11 08:36

2012-02-21 11:59:18.106 textView[20977:fe03] ; target= <(action=delayed:, target=)>>

2012-02-21 11:59:18.107 textView[20977:fe03] ; target= <(ac

1条回答
  •  星月不相逢
    2021-02-11 09:13

    You need something like:

    for (UIGestureRecognizer *g in myTextView.gestureRecognizers)
    {
        if ([g isKindOfClass:[UITapGestureRecognizer class]])
        {
            if (([(UITapGestureRecognizer *)g numberOfTouchesRequired] == 2) && ([(UITapGestureRecognizer *)g numberOfTapsRequired] == 1))
            {
                [g setEnabled: NO];
            }
        }
    }
    

    0 讨论(0)
提交回复
热议问题