【发布时间】:2018-10-30 00:33:12
【问题描述】:
我有一个计算器应用程序,当前 cos⁻¹ 按钮如下所示:
但我希望它看起来像这样:
完成此任务的最简单方法是什么?有什么方法可以做到这一点而不会弄乱NSAttributedString?我可以使用任何特殊字符吗?
【问题讨论】:
-
除非你有一个 UTF-8 上标字符的方式(我很确定你没有),那么我猜你必须“搞乱
NSAttributedString。另一件事 - 你 可以使用图像,但我认为那是“更混乱”。 -
@dfd,你不需要使用属性。上标数字字符串有 unicode 字符。
-
对于 NSAttributedString:stackoverflow.com/questions/25367017/…
标签: swift string uibutton uilabel nsattributedstring