Question: Does anyone know how to stop a UIWebView from bouncing vertically? I mean when a user touches their iphone screen, drags their finger downwards, and the webview shows a blank spot above the web page I had loaded?

I've looked at the following possible solutions, but none of them worked for me:

<http://www.iphonedevsdk.com/forum/iphone-sdk-development/996-turn-off-scrolling-bounces-uiwebview.html>

<http://forums.macrumors.com/showthread.php?t=619534>

[How do I stop a UIScrollView from bouncing horizontally?](https://stackoverflow.com/questions/173786/how-do-i-stop-a-uiscrollview-from-bouncing-horizontally)

Answer: 
Brad's method worked for me. If you use it you might want to make it a little safer.

```
id scrollView = [yourWebView.subviews objectAtIndex:0];
if( [scrollView respondsToSelector:@selector(setAllowsRubberBanding:)] )
{
    [scrollView performSelector:@selector(setAllowsRubberBanding:) withObject:NO];
}

```

If apple changes something then the bounce will come back - but at least your app won't crash.
Look into the `bounces` property of `UIScrollView`. Quoth the Apple docs:

> 
> If the value of the property is `YES` (the default), the scroll view bounces when it encounters a boundary of the content. Bouncing visually indicates that scrolling has reached an edge of the content. If the value is `NO`, scrolling stops immediately at the content boundary without bouncing.
> 
> 
> 

Make sure you're using the right `UIScrollView`. I'm not sure what the hierarchy looks like for a `UIWebView`, but the scroll view could be a parent, not a child, of the `UIWebView`.