用子弹点格式化UILabel?
问题描述:
是否可以在 UILabel
中格式化文本
以显示项目符号?
Is it possible to format the text
in a UILabel
to show a bullet point?
如果是这样,我该怎么做?
If so, How can I do it?
答
也许在字符串中使用Unicode代码点作为项目符号?
Perhaps use the Unicode code point for the bullet character in your string?
Objective-c
myLabel.text = @"\u2022 This is a list item!";
Swift 4
myLabel.text = "\u{2022} This is a list item!"