iOS 7启动画面在启动时重新调整大小

时间:2014-09-18 07:11:19

标签: cordova ios7

我有一个基于Cordova的应用程序,由于应用程序上方的iOS7状态栏,我重新调整了webview的大小:

- (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];
}

现在的问题是启动画面以全屏幕启动,但当状态栏出现时,启动画面会重新调整大小。

有什么想法吗? 谢谢!

1 个答案:

答案 0 :(得分:0)

将图像重新调整为2048 x 1575似乎可以解决问题......