Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在UIScrollViewDelegate中取消阻止平移和收缩事件?_Ios_Events_Gestures_Uiscrollviewdelegate - Fatal编程技术网

Ios 如何在UIScrollViewDelegate中取消阻止平移和收缩事件?

Ios 如何在UIScrollViewDelegate中取消阻止平移和收缩事件?,ios,events,gestures,uiscrollviewdelegate,Ios,Events,Gestures,Uiscrollviewdelegate,我有一个UIView,它有一个UIScrollView子视图,是一个UIScrollViewDelegate。因为我已经实现了viewForZoomingInScrollViewui视图的平移和收缩事件 如何恢复这些事件?尝试将代理添加到实现 - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGesture

我有一个UIView,它有一个UIScrollView子视图,是一个UIScrollViewDelegate。因为我已经实现了
viewForZoomingInScrollView
ui视图的平移和收缩事件


如何恢复这些事件?

尝试将代理添加到实现

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    return YES;
}
尝试:

[yourviewname setUserInteractionEnabled:是]



编辑:我刚刚重读了你的问题。你是说你不能平移和/或捏?或者你是说当你平移和/或平移时没有收到通知?

我的问题是当用户平移或平移时没有收到通知。埃德温·伊斯干达的建议解决了这个问题。