Why No NSAttributedString on the iPhone?

前端 未结 6 1455
春和景丽
春和景丽 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:38

    I'm afraid you're going to have to roll your own. If you're getting bogged down when doing table drawing, I'd probably switch to raw Quartz calls; try and dump all your drawing into a single view, and do all your complex string drawing within it. NSAttributedString is handy, but I don't think it's using all that much special AppKit-mojo to get much better performance than straight string drawing calls.

提交回复
热议问题