UILabel Text with Multiple Font Colors

前端 未结 8 665
一向
一向 2020-12-19 18:48

Is there a way to have the textColor property of a UILabel be two different UIColors? Basically I\'m trying to make the first characte

8条回答
  •  孤城傲影
    2020-12-19 19:18

    not currently possible, usually you would use an NSAttributedString, but to use this on iOS you would need to roll your own label. you may be able to work round this using a UIWebView, but I don't like to do that, it seems heavy handed.

提交回复
热议问题