zoukankan      html  css  js  c++  java
  • iOS14 :UIProgressView的height变高了、 iPhone11的状态栏高度变成为43了

    使用xcode12.0.1 运行程序在iOS14.2公测版上的时候发现加载网页时写的UIProgressView的height变高了

    解决办法:判断如果是iOS14就更新一下

    transform = CGAffineTransformMakeScale(1.0f, 0.5f);
        _progressView = [[UIProgressView alloc] initWithFrame:CGRectMake(0, NAV_HEIGHT - 1, WIN_WIDTH, 1)];
        [_progressView setProgress:0];
        [_progressView setTintColor:C1];
        [_progressView setProgressViewStyle:UIProgressViewStyleDefault];
        [_progressView setTrackTintColor:[UIColor whiteColor]];
        CGAffineTransform transform = CGAffineTransformMakeScale(1.0f, 1.0f);
        if (@available(iOS 14, *)) {
            transform = CGAffineTransformMakeScale(1.0f, 0.5f);
        }
        _progressView.transform = transform;
        [self.view addSubview:_progressView];

    另外:同事测试新的APP,发现他手机显示的导航栏变了,实际测试了一下原来是iPhone11的状态栏高度为43,其他刘海屏是44。

    好神奇,以后判断是不是刘海屏还是判断状态栏高度大于20吧!希望以后这个bug会修复!

  • 相关阅读:
    pyinstaller模块
    使用reduce方法数组去重
    Linux的关机与重启命令
    splice和slice的区别
    发现splice的新大陆
    text-decoration和outline
    前端中关于堆和栈的那些事
    git
    前端代码规范
    弹性布局在项目中的使用示例
  • 原文地址:https://www.cnblogs.com/ljcgood66/p/13818914.html
Copyright © 2011-2022 走看看