开发者

UIWebView starts with white border at bottom

开发者 https://www.devze.com 2023-04-12 18:08 出处:网络
I have a UIWebview in an universal app that starts with a white border at the bottom, when starting the app in Portrait Mode. In landscape it works.

I have a UIWebview in an universal app that starts with a white border at the bottom, when starting the app in Portrait Mode. In landscape it works.

If I rotate the app then everything is fine in Portrait also. I've set a backgroundcolor and disabled scrolling.

// set backgroundcolor
[webView setOpaque:NO];
[webView setBackgroundColor:RGB(154, 148, 131)];

//Load the request in the UIWebView.
[webView loadReque开发者_JS百科st:requestObj];

// prevent scrolling up & down
[[[webView subviews] lastObject] setScrollEnabled:NO];

Does anybody know why this could be?


Its possibly related to the status bar. Depending on how you have configured your nib the top of your view can end up sliding under the status bar leaving white space at the bottom. Check that you've specified that it has a status bar in the nib for the view (in the first tab of the inspector for the view).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号