Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ethana

macrumors 6502a
Original poster
Jul 17, 2008
836
0
Seattle, WA
Is there a way to stop UIWebView from bouncing vertically?

I have a UIWebView in my app and I can bounce it vertically with my finger and I can't turn it off.

And no it isn't a subclass of UIScrollView, it's a subclass of UIView.

Thanks,

Ethan
 

ghayenga

macrumors regular
Jun 18, 2008
190
0
Is there a way to stop UIWebView from bouncing vertically?

I have a UIWebView in my app and I can bounce it vertically with my finger and I can't turn it off.

And no it isn't a subclass of UIScrollView, it's a subclass of UIView.

Thanks,

Ethan

The UIWebview isn't a subclass of UIScrollView but it does have a *subview* that is a UIScrollView.

So this *should* work.

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
UIScrollView *scrollView = [webView.subviews objectAtIndex:0];
scrollView.bounces = NO;
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.