From 14d7bd39c7de99851ef1ecdb3f14c24d197b23e8 Mon Sep 17 00:00:00 2001 From: Vicky <10212746+haifeng-jiang@user.noreply.gitee.com> Date: Tue, 13 Oct 2026 17:04:32 +0800 Subject: [PATCH] =?UTF-8?q?update=20:=20ios=20=E5=90=AF=E5=8A=A8=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner/AppDelegate.swift | 13 +++++++++++++ ios/Runner/Base.lproj/LaunchScreen.storyboard | 10 ++++------ ios/Runner/Base.lproj/Main.storyboard | 4 ++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 6e4e5dd..0147af1 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,6 +1,19 @@ import Flutter import UIKit +/// Keeps the system LaunchScreen as the only splash. Flutter would otherwise +/// instantiate that storyboard again and the icon appears a second time. +final class RunnerFlutterViewController: FlutterViewController { + override func loadDefaultSplashScreenView() -> Bool { + false + } + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .black + } +} + @main @objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { override func application( diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard index 75967df..5f55b1c 100644 --- a/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -9,10 +9,6 @@ - - - - @@ -21,8 +17,10 @@ - - + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard index f3c2851..4cb5eb8 100644 --- a/ios/Runner/Base.lproj/Main.storyboard +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -8,7 +8,7 @@ - + @@ -16,7 +16,7 @@ - +