Webビューのスクロール禁止

1184 ワード

 
 

ios5

self.scrollView.scrollEnabled = NO;

- (void)disableBounce {
//    [[[self subviews] lastObject] setScrollingEnabled:NO];
   for (id subview in self.subviews){
        if ([[subview class] isSubclassOfClass: [UIScrollView class]]){
            ((UIScrollView *)subview).bounces = NO;
            ((UIScrollView *)subview).scrollEnabled = NO;
        }
    }
}