修复 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
@@ -288,7 +288,7 @@ Contract Design Plan(本文档)
|
||||
##### 1.E 集成 + 烟雾测试
|
||||
|
||||
- [x] **1.14.a** AppIcon:从 `docs/res/Images.xcassets/AppIcon-1.appiconset` 拷贝 9 个 png + Contents.json 到 `ylgamehall/Assets.xcassets/AppIcon.appiconset`,替换 Xcode 默认空模板。已实测 BuildProject 通过。actool 3 个 warning(iPad 76 / 83.5 / 1024 缺失)暂不处理,iPad 会自动用 iPhone 缩放,1024 是 App Store 上架要求(企业签不强制);待 Phase 10 上线前 polish 时补齐
|
||||
- [x] **1.14.b** LaunchScreen:把 `docs/res/Res/Default-568h@2x~iphone.png` 拷到 `ylgamehall/Assets.xcassets/SplashImage.imageset`(universal idiom,仅 @2x 物理文件 29708 字节 640×1136 竖图);改写 `LaunchScreen.storyboard` 为单一 UIImageView 全屏铺满(contentMode = .scaleAspectFill,背景 .black,四边约束到 superview)。注:竖图在横屏设备上会被 aspectFill 裁剪上下,启动只显示 0.x s 接受此折衷,Phase 10 polish 时再考虑出一张专门的横屏素材。BuildProject 通过
|
||||
- [x] **1.14.b** LaunchScreen:源素材 `docs/res/Res/Default-568h@2x~iphone.png` 是 CgBI PNG,物理 640×1136 但画面内容是"横躺"在竖向容器里(msext 旧 LaunchImage 系统依赖 device orientation 自动旋转);现代 LaunchScreen.storyboard 没有这个魔法,直接显示会看到躺倒画面。处理:用 `sips -r -90` 一次性把素材逆时针旋转 90° 输出为标准 PNG(去 CgBI),物理像素 1136×640,存到 `ylgamehall/Assets.xcassets/SplashImage.imageset/SplashImage@2x.png`(universal idiom)。storyboard 用单一 UIImageView 全屏铺满,`contentMode = scaleAspectFit`,背景 `.black`,四边约束到 superview。aspectFit 在比 16:9 更宽的现代横屏 iPhone 上左右补黑边(黑底无违和),保画面完整不裁切 logo。WebContainer 的 SplashOverlay 用同款 contentMode,避免启动 → 容器视觉过渡时跳变。BuildProject 通过
|
||||
- [x] **1.14.c** `LobbyZipUpgrader` 加 progress 回调
|
||||
- `upgradeIfNeeded(resolved:onProgress:) async throws -> Outcome`,`onProgress: @escaping @Sendable (Double) -> Void` 默认 no-op 报告 0.0…1.0
|
||||
- 文件内私有 `DownloadProgressDelegate: URLSessionDownloadDelegate, @unchecked Sendable`,实现 `didWriteData:totalBytesWritten:totalBytesExpectedToWrite:`;通过 `session.download(from:delegate:)` 注入
|
||||
@@ -800,7 +800,7 @@ H5 调 `OpenurlTitleData` 打开弹层 WebView,弹层内 H5 用 `window.settin
|
||||
- [x] 1.12 LocalVersionReader(version.xml 解析 + ATS 全局放行)
|
||||
- [x] 1.13 LobbyZipUpgrader(actor,原子 rename 升级;端到端实测 260→261)
|
||||
- [x] 1.14.a AppIcon 替换 Xcode 默认空模板(iPad / 1024 缺失留 Phase 10 polish)
|
||||
- [x] 1.14.b LaunchScreen 改启动图(SplashImage 全屏 scaleAspectFill,竖图横屏裁剪折衷)
|
||||
- [x] 1.14.b LaunchScreen 改启动图(素材逆时针旋转 90° → 物理 1136×640,scaleAspectFit + 黑底左右补边)
|
||||
- [x] 1.14.c LobbyZipUpgrader 加 progress 回调(URLSessionDownloadDelegate,0.0…1.0)
|
||||
- [x] 1.14.d WebContainerViewController(SplashOverlay + 16:9 letterbox + 启动流水线 + 三种 alert)
|
||||
- [x] 1.14.e WebView didFinish 后 0.3s 淡出 splash + removeFromSuperview
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 37 KiB |
@@ -15,7 +15,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="852" height="393"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" image="SplashImage" translatesAutoresizingMaskIntoConstraints="NO" id="ImgV-Sp-1ab">
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" image="SplashImage" translatesAutoresizingMaskIntoConstraints="NO" id="ImgV-Sp-1ab">
|
||||
<rect key="frame" x="0.0" y="0.0" width="852" height="393"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
@@ -35,6 +35,6 @@
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="SplashImage" width="640" height="1136"/>
|
||||
<image name="SplashImage" width="1136" height="640"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -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