IBM Worklight 6.2 - iOS 7中的底部空白区域

时间:2014-09-03 06:29:12

标签: ios7 ibm-mobilefirst

在IOS 7中,页面底部有20个像素的空白区域。我正在使用worklight 6.2。我碰巧阅读了一些其他相关文档,并了解到此问题已从worklight 6.0.0.1中解决。

1 个答案:

答案 0 :(得分:0)

我有点惊讶你在底部遇到这个问题 - 我在顶部遇到过它,但这是因为状态栏位于页面顶部。

请检查此链接:http://www-01.ibm.com/support/docview.wss?uid=swg27039574 - 这基本上说WL添加了一些具有一些CSS属性的类,但这并不总是有效。这就是为什么你必须转向本机代码来准确指定UIWebView的尺寸。 就我而言:

CSS:

#wl_ios7bar {
display: none !important;
}

body.wl_ios7 {
    padding-top: 0px !important;
}

目标-C:

- (void)viewWillAppear:(BOOL)animated
{
    // View defaults to full size.  If you want to customize the view's size, or its subviews (e.g. webView),
    // you can do so here.
    //Lower screen 20px on ios 7
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
        CGRect viewBounds = [self.webView bounds];
        viewBounds.origin.y = 18;
        viewBounds.size.height = viewBounds.size.height - 18;
        self.webView.frame = viewBounds;
    }
    [super viewWillAppear:animated];
}

希望这有帮助!