显示占位图时会闪烁
378056350 opened this issue · comments
型号:iOS12
设置:SourceTypeLaunchScreen
问题:点击APP后,显示占位图,随后占位图会缩小一块,未铺满的位置会显示系统桌面,随机再正常显示广告
找到问题了,下面这句话是元凶:
[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];
使用
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
就没问题
总结:iOS12.1、iPhoneXR下使用[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES]; 屏幕截图会有问题,需要添加判断