PDA

View Full Version : Is there a way to stop UIWebView from bouncing vertically?




ethana
Dec 19, 2008, 03:33 PM
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
Dec 20, 2008, 06:06 PM
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;