新建UIView分類(lèi)
- (void)setSubScrollsToTop:(BOOL)scrollsToTop{
[[self subviews] enumerateObjectsUsingBlock:^(UIView *obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:[UIScrollView class]]) {
[(UIScrollView *)obj setScrollEnabled:scrollsToTop];
*stop = YES;
}
}];
}