Andrzej Michnia
Andrzej Michnia

Reputation: 550

iOS 11+ launch screen - custom named colors in dark mode

Is it possible to use user defined named colors in the launch screen storyboard?

I tried creating test color in xcassets, with appearances {dark, any} and setting it as Launch screen main view background.

I noticed significant differences: - in RELEASE my custom colors never work - in DEBUG some colors work, some are ignored, some are changing values (e.x. dark color is correct, but light is biased), and generally it is a mess

I know I need to delete app every time since launch screen is cached, are there any additional constraints? I fail to get any consistent results. Only thing that seems to work is "System background color".

Similar question goes for images.

Upvotes: 0

Views: 252

Answers (2)

berbie
berbie

Reputation: 1028

This is still a mess in iOS 13. I ended up using the build in dynamic system colours and tinting them with an overlay.

Upvotes: 0

Andrzej Michnia
Andrzej Michnia

Reputation: 550

OK, so short update. It is possible to use named colors and images with dark appearance on the launch screen after all.

It just works like nightmare. Which means that some parts are getting somehow cached (not sure what is happening underneath).

The final result is that to get consistent results, I had not only to delete app from the device, but also restart the phone.

I also noticed, that images with dark appearance are somehow broken - twice bigger or twice smaller, than their "any" appearance counterparts (even when I used exactly same files). That altogether creates unbelievable mess making it hard to test.

Upvotes: 1

Related Questions