UIWebView shows a white bar at the top and bottom when scrolling

I have a UIWebView on top of a UIImage. When I view the UIWebView, two white stripes appear. 1, at the very top of the iPad window (i.e. the top of the UIImage, which is only a background image), and 2, at the top of the UIWebView. UIIMage is in the XIB, but the WebView is executing programmatically, as shown below:

mainWebView = [[[CustomWebview alloc] initWithFrame:CGRectMake(59, 0, 650, 1024)] retain];
[(UIScrollView*)[mainWebView.subviews objectAtIndex:0] setShowsHorizontalScrollIndicator:NO];
[(UIScrollView*)[mainWebView.subviews objectAtIndex:0] setShowsVerticalScrollIndicator:NO];

[mainWebView        setOpaque:NO];
[mainWebView        setBackgroundColor:[UIColor clearColor]];
[backgroundImage    addSubview:mainWebView];
[mainWebView        setDelegate:self];

The same model is repeated at the bottom of the iPad. One white bar is at the bottom of the WebView, and the other is at the very end of the UIImage.

Watch photos and videos for 20 seconds: (screenshots cannot be taken when scrolling) two white barsno white bars

20 second video: http://dl.dropbox.com/u/1392139/IMG_0601.MOV

I would like to find a fix for this, having already spent many hours on it, and this is my last fix error to send!

+3
1

, . .

0

All Articles