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

2017-04-20  本文已影响113人  楠Y

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

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;

}

上一篇下一篇

猜你喜欢

热点阅读