美文网首页
UIPickView滚动未结束选择导致的数据错误

UIPickView滚动未结束选择导致的数据错误

作者: 未来可期me | 来源:发表于2017-10-24 14:32 被阅读10次

- (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;
    
}

相关文章

网友评论

      本文标题:UIPickView滚动未结束选择导致的数据错误

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