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: 
Well all I did to accomplish this is :

```
UIView *firstView = [webView.subviews firstObject];

if ([firstView isKindOfClass:[UIScrollView class]]) {

    UIScrollView *scroll = (UIScrollView*)firstView;
   [scroll setScrollEnabled:NO];  //to stop scrolling completely
   [scroll setBounces:NO]; //to stop bouncing 

}

```

Works fine for me... 
Also, the ticked answer for this question is one that Apple will reject if you use it in
your iphone app.
I traversed the collection of UIWebView's subviews and set their backgrounds to [UIColor blackColor], the same color as the webpage background. The view will still bounce but it will not show that ugly dark grey background.