I have a UILabel and its attirbutedText value is set to something like "8 km/h" and is changing succesfully to other similar values. Later I want to set the attributedText with value of "-". I am dispatching the update on the main queue. The code for the update is called but it never updates on the screen and the previous assigned value stays.
controller.speedValueLabel.attributedText = NSAttributedString(string: "-")
One way to call this code is when tapping a button. When this happens the label updates with "-". Another way is in the block of a timer. The timer is started and stopped on the main thread. When it fires it does nothing and the UILabel is just not updated. I tried with similar timer (but another one) and it also updated succesfully. What can be wrong?