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 @@ - +