iOS 13 DarkMode and LaunchScreen - Fallback for iOS 10

后端 未结 1 642
眼角桃花
眼角桃花 2021-01-13 12:15

I have a blue logo on the launchscreen.storyboard on white background. For the new DarkMode introduced with iOS 13 I like to invert the colors, i.e. blue background and whit

相关标签:
1条回答
  • 2021-01-13 12:19

    As suggested here, the solution is to use a dynamic image for the background instead:

    1. Create 2 images with the flat colors for light and dark mode.
    2. Import them in your Asset Catalog and define the “Any”/“Dark” appearances.
    3. Add a UIImageView in the background of your Launch Screen with this image (“Scale to Fill”, constrained to container).

    This will compile even if your deployment target is lower than iOS 11.0, and will display the appropriate color at launch.

    0 讨论(0)
提交回复
热议问题