Why No NSAttributedString on the iPhone?

前端 未结 6 1461
春和景丽
春和景丽 2020-12-11 12:12

Does anyone know what made Apple leave out NSAttributedString when turning AppKit into UIKit?

The reason I ask is that I would really like to use it in my iPhone app

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-11 12:30

    Another approach would be to use a UIWebView with HTML. Or, if you are daring you can make use of the undocumented setHTML method on UITextView to set small snippets of formatted text...

    To me this seems more like the future of where supporting formatted text will go, some way to leverage Webkit in outputting formatted strings.

提交回复
热议问题