1 cordova File插件问题

cordova 5.0创建本地文件夹 目录变成了 file:///data/user/0/com.xxx.xxx/xxx

4.0 是 file:///storage/emulated/0/xxx ,即可以在SD卡下面看到

解决方案:https://www.npmjs.com/package/cordova-plugin-file#upgrading-notes

 

2 ios上方状态栏留白(ios7以上)

修改MainViewController.m的- (void)viewWillAppear:(BOOL)animated 方法:

- (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.
    
    // ios上方状态栏留白 --update by jager 20160630
    // begin
    if(loadView && [[[UIDevice currentDevice] systemVersion] floatValue] >= 7){
        CGRect viewBounds = [self.webView bounds];
        viewBounds.origin.y = 20;
        viewBounds.size.height = viewBounds.size.height - 20;
        self.webView.frame = viewBounds;
        loadView = false;
    }
    // end

    [super viewWillAppear:animated];
}

 

相关文章:

  • 2021-05-20
  • 2022-12-23
  • 2021-11-04
  • 2021-06-22
  • 2022-03-04
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-21
  • 2022-12-23
  • 2019-02-26
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案