The issues is cause by setting a custom color in the storyboard,its not related to custom font.
Step 1: Define color in Assets Folder
Step 2: Set that color as label text color
Step 3: Change the text color in code
Label background color is changing but text color is not changing
The easiest workaround is create dummy labels in IB, give them the text the color you like and set to hidden. You can then reference this color in your code to set your label to the desired color. The only way I could change the text color programmatically was by using the standard colors, UIColor.
I faced the exact same problem. I suppose it's a bug in the xCode. The issue arrises when you set custom colour in storyboard or xib. What you can do:
I tried it and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With