title: Highlight Text in UITextView - iOS / Swift
body: <p>I am developing an iOS 8.0+ app in Swift 2.0 that uses UITextView to display Strings of various lengths (ranging from about 100 characters to about 60,000 characters).</p>
  
  <p>When the UITextView appears with its .text value set to a given String, I would like the UITextView to automatically highlight (in yellow) all of the occurrences of a particular substring contained in an optional variable that is prepopulated in the view controller.  (If the optional variable is not set, then nothing is highlighted.)</p>
  
  <p>How can I:  1) identify and select all of the occurrences of a particular substring in a String, and 2) highlight each occurrence in yellow in a UITextView?</p>
  
  <p>Thank you!</p>