1***@qq.com
1***@qq.com
  • 发布:2017-12-28 14:51
  • 更新:2018-08-16 11:20
  • 阅读:1180

【报Bug】

分类:5+ SDK

详细问题描述
[内容]通过通知的方法解决白屏问题,但是进入主页只有状态栏和页面之间有20的间隙

重现步骤
[步骤]
[结果]
[期望]

运行环境
[系统版本]
[浏览器版本]
[IDE版本]
[mui版本]

附件
[代码片段]

  • (void)loadView
    {
    [super loadView];
    // self.automaticallyAdjustsScrollViewInsets = NO;
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(replaceToH5View) name:PDRCoreAppFrameDidLoadNotificationKey object:nil];
    if(pContentVIew == nil)
    pContentVIew = [[UIView alloc] initWithFrame:self.view.frame];
    // pContentVIew.backgroundColor = [UIColor redColor];
    [self.view addSubview: pContentVIew];

    UIImageView *bgImageV = [[UIImageView alloc] initWithFrame:self.view.bounds];
    bgImageV.image = [UIImage imageNamed:@"1242x2208"];
    [pContentVIew addSubview:bgImageV];

    PDRCore *h5Engine = [PDRCore Instance];
    [self setStatusBarStyle:h5Engine.settings.statusBarStyle];
    _isFullScreen = [UIApplication sharedApplication].statusBarHidden;
    if ( _isFullScreen != h5Engine.settings.fullScreen ) {
    _isFullScreen = h5Engine.settings.fullScreen;
    if ( [self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)] ) {
    [self setNeedsStatusBarAppearanceUpdate];
    } else {
    [[UIApplication sharedApplication] setStatusBarHidden:_isFullScreen];
    }
    }
    h5Engine.coreDeleagete = self;
    h5Engine.persentViewController = self;

    // 设置WebApp所在的目录,该目录下必须有mainfest.json
    NSString* pWWWPath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Pandora/apps/HelloH5/www"];

    NSString* pArgus = @"id=plus.runtime.arguments";
    // 启动该应用

    pAppHandle = [[[PDRCore Instance] appManager] openAppAtLocation:pWWWPath withIndexPath:@"login.html" withArgs:pArgus withDelegate:nil];

    // 如果应用可能会重复打开的话建议使用restart方法
    //[[[PDRCore Instance] appManager] restart:pAppHandle];
    }

  • (void)replaceToH5View{

    // 设置5+SDK运行的View
    [[PDRCore Instance] setContainerView:pContentVIew];
    }

[安装包]

联系方式
[QQ]1089036
[电话]

2017-12-28 14:51 负责人:无 分享
已邀请:
Costword

Costword

我也遇到这个问题了,如果隐藏状态栏就正常显示,但是正常情况是需要显示状态栏的

该问题目前已经被锁定, 无法添加新回复