8

I am working on adapting my existing iOS 11+ app to the new Dark Mode in iOS 13. Using dynamic / named colors works without any problem to switch between been normal and dark appearance, except on the apps launch screen.

  • A simple XIB file is selected as launch image in the target settings
  • The launch screen works without any problem, except that the background color is not adapted to normal / dark mode.
  • The launch screen uses a dynamic / named color as background color. Lets say green is selected for Any appearance and red for "Dark appearance". No matter if the devices is setup to use normal or dark mode the launch screen always shows Any appearance color (green).
  • If the Any appearance color is set to some other value, e.g. yellow, the launch screen will appear in this color ==> The background color is setup correctly
  • Toggeling the interface style in Interface Builder shows the correct result ==> The background color is setup correctly
  • Using the same dynamic color in other places within the app (e.g. on the first view controller) works without any problem ==> The color is setup properly
  • Using a build in dynamic color like System Background Color works without any problem (white background in normal mode and black background in Dark Mode)
  • Using dynamic background image instead (as proposed in some other threads) has exactly the same problem (only shows normal appearance color).

So, how to get the launch screen to properly work with Dark mode?

Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
  • Have you tried uninstalling your app and restarting your device? The launch screen is cached pretty heavily by the system and many changes won't take effect until you do the former. – Frank Rupprecht Oct 11 '19 at 08:17
  • 1
    The result in different simulators, on different devices, device restarts, simulator resets, etc. is always the same. Additionally when switching to a build in dynamic color like `System Background Color` the effect becomes visible immediately. Thus this seems not to be a caching problem. – Andrei Herford Oct 11 '19 at 08:53
  • I am having this exact same issue. It seems like "named colors" aren't supported. – Grant Kamin Oct 15 '19 at 20:04
  • @AndreiHerford Did you resolve this issue? I'm facing the same issue. – Javed Salat Apr 14 '21 at 14:15

0 Answers0