遇到此类情况,只需要对UIScrollview进行自定义即可
</br>
MyCustomScrollView.h文件
<pre>#import <UIKit/UIKit.h></br>
@interface MyCustomScrollView : UIScrollView</br>
@end</br>
</pre>
MyCustomScrollView.m文件
<pre>
import "MyCustomScrollView.h"</br>
@interface MyCustomScrollView ()<UIGestureRecognizerDelegate></br>
@end</br>
@implementation MyCustomScrollView</br>
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {</br>
if (gestureRecognizer.state != 0) {</br>
return YES;</br>
} else {</br>
return NO;</br>
}
}
@end</br>
</pre>
网友评论