Background color above (part of rollback) UIWebView

I think this should not be a big problem, but I cannot find a solution on my own. As always: p I have a UIWebView that has the background color set to clearColor, but when I try to scroll too much, I get a "bounce area" over the loaded HTML in dark gray. I would like to change this to transparent / white. Is there any way to change this?
Rejection: I read that classes that inherit from UIScrollView can have the bounce = NO property, and then they will not show the bounce area at all. Even if the UIWebView inherits this class, I would not want to stop it from bouncing, just "bounce it in white", so to speak ...

Thanks a
lot Luka

+5
source share
3 answers

Take a look at the following answer

Remove gradient background from UIWebView?

+8
source

Set the background color of the web browser and set opaque to NO:

[self.webView setBackgroundColor:[UIColor whiteColor]];
[self.webView setOpaque:NO];

Or try setting a transparent color as the background:

[self.webView setBackgroundColor:[UIColor clearColor]];
[self.webView setOpaque:NO];
+4
source

@Ladislav: , :) UIWebView? - , , , . , , , .

:

1. backgroundColor -, clearColor! ! .

myWebView.backgroundColor = [UIColor clearColor];

this line will only make the "overscroll" background easier, but to completely remove it (make it transparent / white), we need to hide all the images found in the subspecies of our myWebView:

for (UIView* subView in [self.myWebView subviews])
{
    if ([subView isKindOfClass:[UIScrollView class]]) {
        for (UIView* shadowView in [subView subviews])
        {
            if ([shadowView isKindOfClass:[UIImageView class]]) {
                [shadowView setHidden:YES];
            }
        }
    }
}

Thanks to everyone, I wish you a great weekend.

0
source

All Articles