Is there a way to stop UIWebView from bouncing vertically?

Discussion in 'iPhone/iPad Programming' started by ethana, Dec 19, 2008.

  1. macrumors 6502a

    Joined:
    Jul 17, 2008
    Location:
    Seattle, WA
    #1
    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
     
  2. macrumors regular

    Joined:
    Jun 18, 2008
    #2
    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;
     

Share This Page