首页 > 解决方案 > 我在所有模拟器的屏幕顶部和底部都有一个大黑条

问题描述

在此处输入图像描述这是在 CDVViewController.m 中编写的代码,仅基于它的显示内容。如果我向上滚动视图,则在图像 iphone 屏幕滚动视图中移动到绿色视图下..如何根据 iphone 屏幕修复此问题我是 Cordova 的新手,任何人都可以帮助我吗?

 -(void)createView
    {CGRect webViewBounds = self.view.bounds;

        webViewBounds.origin = self.view.bounds.origin;

        self.webView = [self newCordovaViewWithFrame:webViewBounds];
        self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);

        [self.view addSubview:self.webView];
        [self.view sendSubviewToBack:self.webView];
    }
    -(UIWebView*)newCordovaViewWithFrame:(CGRect)bounds
    {
        return [[UIWebView alloc] initWithFrame:bounds];
    }

标签: iosobjective-ccordovauiwebviewuiwindow

解决方案


听起来您没有包含启动故事板(或所有预期尺寸的启动图像)。将其中之一添加到您的项目中,您应该没问题。


推荐阅读