美文网首页
UIPickerView滚动时确定按钮点击问题

UIPickerView滚动时确定按钮点击问题

作者: 楠Y | 来源:发表于2017-04-20 16:21 被阅读113次

    //确认按钮点击事件调用

    if ([self anySubViewScrolling:self.myPicker]) return;

    - (BOOL)anySubViewScrolling:(UIView *)view{

    if ([view isKindOfClass:[UIScrollView class]]) {

    UIScrollView *scrollView = (UIScrollView *)view;

    if (scrollView.dragging || scrollView.decelerating) {

    return YES;

    }

    }

    for (UIView * theSubView in view.subviews) {

    if ([self anySubViewScrolling:theSubView]) {

    return YES;

    }

    }

    return NO;

    }

    相关文章

      网友评论

          本文标题:UIPickerView滚动时确定按钮点击问题

          本文链接:https://www.haomeiwen.com/subject/gjulzttx.html