Get Updates By E-mail 

Article Written By:
Johann Dowa

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.


  •  
  •  
  •  
  •  
  •  

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 submit the url here.

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

Comments