Home > Software engineering >  Auto light and dark mode for assets SwiftUI?
Auto light and dark mode for assets SwiftUI?

Time:10-27

Similar to how I can pick a color for light and dark mode in my app's assets on Xcode, is there any way I can pick an image to be used in light and dark mode?

CodePudding user response:

There is! If you go to your assets in XCode and select your image, in the inspector sidebar, you can find a drop down menu Appearance which will give you the ability to input and display images based on the device's appearance preference.

On the right side bar, you can see the Appearances dropdown

  • Related