修复 SplashImage 方向:素材逆时针旋转 90° 改为真正横屏
源素材 docs/res/Res/Default-568h@2x~iphone.png 是 CgBI PNG,物理 640×1136 但画面内容是"横躺"在竖向容器里 —— msext 旧 LaunchImage 系统依赖 device orientation 自动旋转,现代 LaunchScreen.storyboard 没有这个魔法,直接显示 会看到躺倒的画面(用户反馈:启动图的横竖方向错误)。 处理: - 用 sips -r -90 -s format png 一次性把素材逆时针旋转 90° 输出为标准 PNG(顺便去掉 CgBI 优化标志),物理像素 1136×640,覆盖到 ylgamehall/Assets.xcassets/SplashImage.imageset/SplashImage@2x.png - LaunchScreen.storyboard 中 <image> 的 width/height 从 640/1136 改为 1136/640;UIImageView 的 contentMode 从 scaleAspectFill 改为 scaleAspectFit。aspectFit 在比 16:9 更宽的现代横屏 iPhone(如 16 Pro ≈2.17:1)上左右补黑边(黑底无视觉违和),保画面完整不裁切 logo - WebContainer 的 SplashOverlay 用同款 scaleAspectFit,避免启动 → 容器 视觉过渡时出现裁切方式跳变 - BuildProject 通过 Plan 进度已勾选(§5 Phase 1.14.b + §8 同步修订) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
f795957eb1
commit
0ecfa4fb69
@@ -248,7 +248,11 @@ private final class SplashOverlay: UIView {
|
||||
super.init(frame: .zero)
|
||||
backgroundColor = .black
|
||||
|
||||
imageView.contentMode = .scaleAspectFill
|
||||
// 与 LaunchScreen.storyboard 同款 contentMode:素材是 1136×640 横屏画面,
|
||||
// 在更宽的现代横屏设备上用 scaleAspectFit 左右补黑边(黑底统一),
|
||||
// 避免 scaleAspectFill 把 logo 上下裁切;同时确保 LaunchScreen → WebContainer
|
||||
// 视觉过渡时不出现裁切方式跳变。
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.image = UIImage(named: "SplashImage")
|
||||
imageView.clipsToBounds = true
|
||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
Reference in New Issue
Block a user