iPhone demo for NSAttributedString in UILabel and UITextView, showing likely bug in the Apple implementation of the latter.  Taken from Paul Hegarty's demo from Stanford University, CS193P (winter 2013)