5

There is any way to change the color of color set programmatically.

enter image description here

enter image description here

I use theme color in Xcode and now I want this color come from API. Anyone can solve my problem.

I search this on the net but all tell us how to make color set and how to use it but I want how to change this color during run time.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Bijender Singh Shekhawat
  • 3,934
  • 2
  • 30
  • 36
  • Possible duplicate of [How can we use Assets Catalog Colors Sets](https://stackoverflow.com/questions/44397680/how-can-we-use-assets-catalog-colors-sets) – Aleksander Azizi Aug 05 '18 at 15:42
  • all tell how to make color set and then use it.. but i want change it during run time – Bijender Singh Shekhawat Aug 05 '18 at 15:46
  • @BijenderSinghShekhawat, I had this question too but could not find an answer. But when looking at the same question for image assets, the answer was that the asset files are part of the bundle and can not be modified at run time. [Replace images in asset catalog programatically ios] (https://stackoverflow.com/questions/30724238/replace-images-in-asset-catalog-programatically-ios) – Marcy Jan 10 '19 at 22:39
  • @Bijender did you ever find or figure out a solution? – Smartcat May 28 '19 at 21:34
  • @Smartcat sorry bro.. not.. – Bijender Singh Shekhawat Jun 05 '19 at 04:40
  • So if we need to decide colour schemes from back end,we can't use colorset and we need to creat dedicated Theme Manager class – Anees Jun 26 '19 at 05:16
  • 2
    @Anees yes bro.. we cant use colorset when we want to change color from the backend. – Bijender Singh Shekhawat Jun 26 '19 at 07:23

0 Answers0