Super/Subscript appear to be broken in iOS13 (NSAttributedString)

后端 未结 1 825
挽巷
挽巷 2021-01-20 11:14

Trying to display super/subscript text using NSAttributedString in a UITextView seems broken in iOS13 - unless anyone knows otherwise?

Curiously if I use the UIFont

相关标签:
1条回答
  • 2021-01-20 11:56

    Simple 'fix' for this one.

    It appears kCTSuperscriptAttributeName no longer works in iOS13 (for non-system fonts.) You need to use NSSuperscriptAttributeName instead. No idea where the definition for this lives (which header) so the actual string value required is "NSSuperScript"

    0 讨论(0)
提交回复
热议问题