Phase 1.14.e:webView didFinish 后 0.3s 淡出 splash

把 WKNavigationDelegate.didFinish 里的 splash.isHidden = true 换成
UIView.animate(withDuration: 0.3) 渐变 alpha=0 + completion 内
removeFromSuperview,避免渲染瞬间硬切,也让 view 层级在大厅起来后
完全干净(无空持有的 splash 占位)。

BuildProject 通过

Plan 进度已勾选(§5 Phase 1.14.e + §8)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
joywayer
2026-06-22 02:51:25 +08:00
co-authored by Claude Opus 4.7
parent f247b81d6d
commit f795957eb1
2 changed files with 12 additions and 7 deletions
+5 -4
View File
@@ -303,9 +303,10 @@ Contract Design Plan(本文档)
- 横屏锁定 + statusBar 显示,与契约 §4.2 一致
- **暂不实现**`webViewWebContentProcessDidTerminate:` 退避 reload(移到 Phase 3 网络层时一并处理)
- BuildProject 通过
- [ ] **1.14.e** WebView 加载完成后淡出 splash
- `webView(_:didFinish:)``UIView.animate(duration: 0.3)` splash.alpha = 0 → `removeFromSuperview`
- 期间 webView 已渲染好 H5 大厅,无白屏闪烁
- [x] **1.14.e** WebView 加载完成后淡出 splash
- `webView(_:didFinish:)``UIView.animate(withDuration: 0.3)` splash.alpha = 0 → completion 内 `splash.removeFromSuperview()`
- 期间 webView 已渲染好 H5 大厅,无白屏闪烁splash 出 view 层级避免空持有
- BuildProject 通过
- [ ] **1.15** 实现 `Source/Bridge/Handlers/VibratorHandler.swift`
- `register(_ bridge)` 注册 `vibrator` handler → `AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)` + responseCallback `"vibrator"`
- [ ] **1.16** `SceneDelegate``WebContainerViewController` 作 rootViewController
@@ -802,7 +803,7 @@ H5 调 `OpenurlTitleData` 打开弹层 WebView,弹层内 H5 用 `window.settin
- [x] 1.14.b LaunchScreen 改启动图(SplashImage 全屏 scaleAspectFill,竖图横屏裁剪折衷)
- [x] 1.14.c LobbyZipUpgrader 加 progress 回调(URLSessionDownloadDelegate0.0…1.0
- [x] 1.14.d WebContainerViewControllerSplashOverlay + 16:9 letterbox + 启动流水线 + 三种 alert
- [ ] 1.14.e WebView didFinish 后淡出 splash
- [x] 1.14.e WebView didFinish 后 0.3s 淡出 splash + removeFromSuperview
- [ ] 1.15 VibratorHandler
- [ ] 1.16 SceneDelegate → WebContainerViewController
- [ ] 1.17 Demo H5 联调 + 真机验证升级路径