UILabel set rich text color does not display

The color is not displayed on iOS 12.5.7, and the code is correct. The display is normal on iOS15 and 16.
It is found that the problem is the custom color set in the xib, and the code modification is invalid. Cancel the custom color set by Label in xib and it will be displayed normally.

In iOS11, Apple introduced the Color Set function, which can create color resources like images in Assets.xcassets and use them in project files, Xib, and Storyboard. 

Guess you like

Origin blog.csdn.net/u010069091/article/details/129495400