How can you bold just one word in a UILabel?

后端 未结 3 986
忘了有多久
忘了有多久 2021-02-15 16:09

It\'s easy to display a single label with entirely the same text but what happens when you want to display one word in bold?

Example:

All your bases are<

3条回答
  •  逝去的感伤
    2021-02-15 16:36

    Unfortunately, this is currently not possible. You could, however, subclass UILabel and include this functionality.

    Another possibility would be using a UIWebView, but this requires using HTML tags and the loadHTML: method.

提交回复
热议问题