Is there a neat way to represent a fraction as an attributed string?

前端 未结 3 1059
梦如初夏
梦如初夏 2021-01-24 02:27

i was wondering if there was a builtin method to represent

var someFraction = \"1/12\"

as an attributed string? i.e. the \"1\" is

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-24 02:58

    You could use unicode to display fractions instead of using Attributed strings. This link has a source code written in objective C . You can easily port it in swift.

提交回复
热议问题