[ios] Update Launch Screen to support dark mode #3215
No reviewers
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#3215
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "ios-launchscreen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Human Interface Guidelines suggests showing app’s UI on launch screen.
https://developer.apple.com/design/human-interface-guidelines/patterns/launching/#launch-screens
It was done by adding interface elements to
LaunchScreen.storyboard
.Since LaunchScreen can not run any code, UI was recreated manually.
It required carefully using AutoLayout to make similar button positions.
Although not 100% pixel perfect, it’s almost identical to real UI,
as can be seen with Simulator while trying on different devices.
In order to support Dark Mode, several assets had to be duplicated:
This is necessary for iOS to choose between light and dark appearance.
For this reason also added 3 colorsets with values from
Colors.swift
.All additions are in a separate
Media.xcassets
inStoryboard
folder.This duplication is extra 135 Kb, which seems okay for this task.
Closes: organicmaps/organicmaps#3049
Technically there was a launch screen, but it was completely empty, just filled with map background color for light mode. I believe the improvement is huge bucause:
Light mode, vertical orientation, before vs. after:
Night mode, horizonal orientation, before vs. after:
In my opinion it's totally worth having 135 Kb of duplicating resources for a much smoother launch experience.
As far as I can tell, the only way to avoid duplication is to fully switch from separate imagesets (
btn_zoom_in_dark
andbtn_zoom_in_light
) to combined dark/light resources (likebtn_zoom_in_both
), as I did for this task. I guess it will require some changes in MWM theming engine to properly handle this type of xcassets. Unfortunately I am not a professional iOS developer, it's just a hobby for me, so I believe a more experienced contributor such as @AntonM030481 would be able to give better estimates.Thanks for the gifs!
so...
I agree with your points.
LaunchScreen was updated: all buttons are removed, only empty tab area is shown.
No resources are duplicated now.
Please see attached gifs.
Thanks! Can you please also remove the toolbar? Actually, we plan to remove it soon to allow users to see more maps on the screen.
@biodranik Thanks for your suggestion! Personally I would argue it is better to keep the toolbar area at the moment.
When UI refactoring really happens, one could easily delete the toolbar from the LaunchScreen.storyboard in XCode by just clicking it in the editor (aka Interface Builder) and pressing Backspace. I would happily do that myself to keep UI consistent (just tag me in a relevant issue).
For now, I believe keeping in line with Apple HIG is better UX than preparing for further changes in advance. What do you think?
Side note: I’d really like to take part in UI improvement discussion. Is it going to follow Android approach here? organicmaps/organicmaps#2905 (comment)
Yes. We like to see the full map like it was done 10 years ago:

What are your arguments for the toolbar? Did you see how much space it takes on iPhone X and alike devices with a larger safe area?
@biodranik Thank you for a detailed explanation of your points.
I updated the launch screen. Now it doesn't have an empty tab bar, just an empty screen filled with a map background color depending on dark/light mode. It felt a little empty, so I added a small logo in the center as a compromise between HIG requirements and Android splashscreen.
Please see light vertical vs dark horizontal:
As for the toolbar as a part of UI, at the moment I have no arguments for it. I guess it would be really better to use buttons instead, since it helps to show more map.
Thanks! Not sure yet about the single icon, it doesn't look perfect. I have an idea: let's move in steps.
@biodranik
https://user-images.githubusercontent.com/11754264/188442021-e95e3d15-e43f-485c-a4a6-2617f1c78b9e.MP4
https://user-images.githubusercontent.com/11754264/188442065-732b4da9-bf19-44b6-be1e-c9e38f7205a2.MP4
As you can see, they both use a grid at launch. I tried the same approach, what so you think?
I believe this grid helps to avoid user confusion on slow devices: the screen is not completely empty (as if the application hangs), but shows a placeholder for map.
I'm sorry that this simple launch screen issue took so much of your time. Hope you are not tired of discussing small details like this one. I'm really a big fan of Organic Maps and hope to do some good for the project!
@biodranik Sorry to bother you, did you have a chance to look at my previous message?
@euf let's move step by step and incrementally improve what we already have by adding an appropriate background to the night theme. I want to clarify though:
Is it possible to implement the dark mode splash background, so it will respect the OM setting, not the system setting?
Of course, later we'll improve OM so it will appropriately handle the system theme settings.
Thanks! A simple yet good start. LGTM
@kirylkaveryn WDYT?