Open Source: NSAttributedString HTML Additions For iOS

The NSAttributedString additions available on the Mac allowing one to easily display properly formatted HTML text do not as of yet exist for iOS devices.

Because of this in order to display rich HTML text we need to use a UIWebview, and apart from being somewhat inconvenient this can bring about other problems. Fortunately Oliver Drobnik from Cocoanetics has created an open source library duplicating the html related NSAttributedString methods available on the Mac.

The library utilizes core text, and Oliver has done a brilliant job of mimicking Apple’s NSAttributedString functionality with tremendous precision. Not all tags are supported so not all HTML will display straight out, but many are available.

The library along with information on supported tags can be found on Github here:
NSAttributedString Additions For HTML

You can find Oliver’s original writeup on the library here:
UIWebView Must Die

Definitely a very useful library for displaying something such as a credits or instruction page within an iOS app.

Keynotopia is the largest collection of user interface design templates so you can build professional active iPhone and iPad app prototypes quickly using Keynote. No programming knowledge required.
Read more...
DeliciousTwitterFacebookLinkedInEmail

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can send a Tweet to @maniacdev on Twitter or submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

5 Responses to Open Source: NSAttributedString HTML Additions For iOS

  1. [18] Open Source: NSAttributed String HTML Additions For iOS http://bit.ly/i8Tf5L

  2. Open Source: NSAttributed String HTML Additions For iOS http://bit.ly/fPIhZt

  3. [App News] Open Source: NSAttributed String HTML Additions For iOS http://bit.ly/fGyXnb

  4. Open Source: NSAttributed String HTML Additions For iOS: Tweet The NSAttributed string… http://goo.gl/fb/SEYO3

  5. Open Source: NSAttributedString HTML Additions For iOS http://bit.ly/dZyoW3

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>