George MacKerron: code blog

GIS, software development, and other snippets

Lightweight inline formatting for NSAttributedString

For Cocoa developers: I’ve just put a small category on NSMutableAttributedString on Github.

It applies *bold*, /italic/, _underline_, -strikethrough-, ^superscript^ and ~subscript~ styles, and handles */nested/* and *overlapping /styles* properly/.

More details at https://github.com/jawj/NSMutableAttributedString-InlineStyles

Share

Written by George

March 11th, 2014 at 4:13 pm

Posted in iPhone,Mac