Skip to content

almohajer/NSAttributedString-Additions-for-HTML

 
 

Repository files navigation

NSAttributedString HTML Additions

This project aims to duplicate the methods present on Mac OSX which allow creation of NSAttributedString from HTML code on iOS.

This is useful for drawing simple rich text like any HTML document without having to use a UIWebView.

Please read the Q&A.

Your help is much appreciated. Please send pull requests for useful additions you make or ask me what work is required.

If you find brief test cases where the created NSAttributedString differs from the version on OSX please send them to us!

Follow @cocoanetics on Twitter.

KNOWN ISSUES

CoreText has a problem prior to iOS 5 where it takes around a second on device to initialize its internal font lookup table. You have two workarounds available:

Some combinations of fonts and unusual list types cause an extra space to appear. e.g. 20 px Courier + Circle

About

Methods to allow using HTML code with CoreText

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published