30
Here’s an open source component that utilizes CoreText to allow you to create customizable text views for code editing called CYRTextView from Ilya Busigin.Specifically CYRTextView allows you to display line numbers, provides gesture based navigation within the text view and allows you to define how text is highlighted using regular expressions. There’s an example included that provides a nice example of how to use the highlighting.