美文网首页
ios14导航栏背景图渐变 出现色差

ios14导航栏背景图渐变 出现色差

作者: 惊蛰_e3ce | 来源:发表于2020-10-09 13:37 被阅读0次

iphone11在ios14系统下导航栏高度变为92 导致导航栏渐变颜色 航导航栏下面不贴合出现色差!
ios13时该高度还是88


Background nil color.png Class Name UIBarBackground.png

iphone12 在14的系统上是47 吐血 通配代码

- (UIImage *)compressOriginalImage:(UIImage *)image toSize:(CGSize)size{
    UIImage * resultImage = image;
    UIGraphicsBeginImageContext(size);
    [resultImage drawInRect:CGRectMake(0, 0, size.width, size.height)];
    image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}


                UIImage *img = [self compressOriginalImage:[UIImage imageNamed:@"trader_nav_backView_Max_Blue_Normal"] toSize:CGSizeMake(kScreenWidth, [UIApplication sharedApplication].statusBarFrame.size.height + 44)];

相关文章

网友评论

      本文标题:ios14导航栏背景图渐变 出现色差

      本文链接:https://www.haomeiwen.com/subject/vijlpktx.html