Hasnain ahmad
Hasnain ahmad

Reputation: 301

having issues regarding custom colors in dark mode in swift

I am updating my applications according to dark mode in iOS 13. I have used custom colors in my applications which works fine on light mode. But when it came to dark mode it didn't work. I am looking for some of code or line of code which helps me to use my already used custom colors in dark mode. I have no idea how to do that. Need help.

Thanks in advance..!!

Upvotes: 0

Views: 508

Answers (1)

Ketan Parmar
Ketan Parmar

Reputation: 27428

You should use colors from the assets! As you are adding images likewise you can add color set in the Assets. From the Attribute inspector, you can change appearances to Any, Dark or Any, Light, Dark and set color for each. Refer below screenshot for better understanding.

enter image description here

Upvotes: 3

Related Questions