UIScrollview存在,右滑手势不响应的解决

遇到此类情况,只需要对UIScrollview进行自定义即可


MyCustomScrollView.h文件

#import 

@interface MyCustomScrollView : UIScrollView

@end

MyCustomScrollView.m文件

import "MyCustomScrollView.h"

@interface MyCustomScrollView ()

@end

@implementation MyCustomScrollView

  • (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {

    if (gestureRecognizer.state != 0) {

    return YES;

    } else {

    return NO;

    }
    }
    @end

你可能感兴趣的:(UIScrollview存在,右滑手势不响应的解决)