Skip to content

Commit 59dfd0a

Browse files
rajveermalviyagnprice
authored andcommitted
ios: Use main background color as the splash screen
Use `DesignVariables.mainBackground` as the iOS launch screen colors. Discussion: https://chat.zulip.org/#narrow/channel/530-mobile-design/topic/splash.20screen.20on.20iOS/near/2215883 Fixes: #1149
1 parent 95da571 commit 59dfd0a

File tree

11 files changed

+58
-79
lines changed

11 files changed

+58
-79
lines changed

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1313
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1414
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15-
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
1615
B34E9F092D776BEB0009AED2 /* Notifications.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34E9F082D776BEB0009AED2 /* Notifications.g.swift */; };
1716
F311C174AF9C005CE4AADD72 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EAE3F3F518B95B7BFEB4FE7 /* Pods_Runner.framework */; };
1817
/* End PBXBuildFile section */
@@ -47,7 +46,6 @@
4746
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
4847
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4948
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
50-
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5149
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5250
B34E9F082D776BEB0009AED2 /* Notifications.g.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notifications.g.swift; sourceTree = "<group>"; };
5351
B3AF53A72CA20BD10039801D /* Zulip.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Zulip.xcconfig; path = Flutter/Zulip.xcconfig; sourceTree = "<group>"; };
@@ -112,7 +110,6 @@
112110
3752899A2AF472D400475D9C /* Runner.entitlements */,
113111
97C146FA1CF9000F007C117D /* Main.storyboard */,
114112
97C146FD1CF9000F007C117D /* Assets.xcassets */,
115-
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
116113
97C147021CF9000F007C117D /* Info.plist */,
117114
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
118115
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
@@ -195,7 +192,6 @@
195192
isa = PBXResourcesBuildPhase;
196193
buildActionMask = 2147483647;
197194
files = (
198-
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
199195
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
200196
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
201197
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
@@ -316,14 +312,6 @@
316312
name = Main.storyboard;
317313
sourceTree = "<group>";
318314
};
319-
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
320-
isa = PBXVariantGroup;
321-
children = (
322-
97C147001CF9000F007C117D /* Base */,
323-
);
324-
name = LaunchScreen.storyboard;
325-
sourceTree = "<group>";
326-
};
327315
/* End PBXVariantGroup section */
328316

329317
/* Begin XCBuildConfiguration section */

ios/Runner/AppDelegate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import Flutter
1010
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
1111
) -> Bool {
1212
GeneratedPluginRegistrant.register(with: self)
13+
14+
// Use `DesignVariables.mainBackground` color as the background color
15+
// of the default UIView.
16+
window?.backgroundColor = UIColor(named: "LaunchBackground");
17+
1318
let controller = window?.rootViewController as! FlutterViewController
1419

1520
// Retrieve the remote notification payload from launch options;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0xF0",
9+
"green" : "0xF0",
10+
"red" : "0xF0"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "srgb",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "0x1D",
27+
"green" : "0x1D",
28+
"red" : "0x1D"
29+
}
30+
},
31+
"idiom" : "universal"
32+
}
33+
],
34+
"info" : {
35+
"author" : "xcode",
36+
"version" : 1
37+
}
38+
}

ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

Lines changed: 0 additions & 23 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

ios/Runner/Base.lproj/LaunchScreen.storyboard

Lines changed: 0 additions & 37 deletions
This file was deleted.

ios/Runner/Info.plist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@
5252
<string>fetch</string>
5353
<string>remote-notification</string>
5454
</array>
55-
<key>UILaunchStoryboardName</key>
56-
<string>LaunchScreen</string>
55+
<key>UILaunchScreen</key>
56+
<dict>
57+
<key>UIColorName</key>
58+
<string>LaunchBackground</string>
59+
</dict>
5760
<key>UIMainStoryboardFile</key>
5861
<string>Main</string>
5962
<key>UISupportedInterfaceOrientations</key>

0 commit comments

Comments
 (0)