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

enter image description here

Step 2: Set that color as label text color

enter image description here

Step 3: Change the text color in code

enter image description here

Label background color is changing but text color is not changing

1

There are 1 answers

0
Sophie On

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:

  1. Use some standard colour in your nib file/storyboard
  2. If you want to change it with some colour asset this can be done programmatically at any time

I tried it and it works.