UILabel with basic rich text support

守給你的承諾、 提交于 2020-01-02 08:43:25

问题


My ipad application has a custom look. It uses text labels extensively for displaying partly colored/shadowed/bold texts. Larger pieces of text may contain numbered lists and embedded Images. There could be couple rich text regions on a single page.

I am not sure that UIWebView is the right tool for displaying strings like:


MyApp title


Hello rich text world

  1. List item
  2. List item

Writing my own text rendering engine looks more sufficient to me than using UIWebView. Any ideas for lightweight rich text renderer ? c library or custom control ?


回答1:


I would recommend using TTStyledLabel from the Three20 library. It provides the desired functionally and would save you the time of writing your own.



来源:https://stackoverflow.com/questions/5895306/uilabel-with-basic-rich-text-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!