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


- (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滚动未结束选择导致的数据错误)