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:
co-authored by
Claude Opus 4.7
parent
f247b81d6d
commit
f795957eb1
@@ -223,9 +223,13 @@ public final class WebContainerViewController: UIViewController {
|
||||
|
||||
extension WebContainerViewController: WKNavigationDelegate {
|
||||
public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
|
||||
// Phase 1.14.d 阶段:直接隐藏 splash(无动画)
|
||||
// Phase 1.14.e 将替换为 UIView.animate(0.3) 淡出 + removeFromSuperview
|
||||
splash.isHidden = true
|
||||
// H5 大厅已经渲染完毕,此时把 splash 从 0.3s 内淡出再 removeFromSuperview,
|
||||
// 避免黑屏闪烁也避免后续 superview 再持有这层不必要的视图。
|
||||
UIView.animate(withDuration: 0.3, animations: { [weak self] in
|
||||
self?.splash.alpha = 0
|
||||
}, completion: { [weak self] _ in
|
||||
self?.splash.removeFromSuperview()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user