0

Possible Duplicate:
UITextView with Syntax Highlighting

I'm working on a source code editor for the iPad, but I'm stuck on square one: syntax highlighting. I'm planning on using libclang to do the heavy lifting, but there doesn't seem to be a good way to show rich text on iOS. I think the best solution would be to have a subclass of UITextView that supports NSAttributedString drawing, but I'm not sure how to do that. I've seen things like Omni's text editor, but it doesn't look very good. I only need multiple colors of a monospaced font. Is there a framework or library that would help draw attributed strings in a UITextView subclass?

Thanks in advance.

Community
  • 1
  • 1
Josh The Geek
  • 1,203
  • 12
  • 24
  • Really? Google the title of your question. possible duplicate of [UITextView with Syntax Highlighting](http://stackoverflow.com/questions/3642540/uitextview-with-syntax-highlighting) and [set nsattributedstring to uitextview](http://stackoverflow.com/questions/5550739/set-nsattributedstring-to-uitextview) – CodaFi May 05 '12 at 01:17
  • @CodaFi Sorry. I was looking for something along the lines of EGOTextView which is linked to in one of those questions, but I guess I never found it. I asked again because nothing seemed recent and I was wondering if something open source had come since those posts. Thanks! – Josh The Geek May 05 '12 at 01:43

1 Answers1

0

http://www.cocoanetics.com/parts/dtrichtexteditor/ is a paid solution that would do almost all the work for you.

https://github.com/Cocoanetics/DTCoreText is the open source backend for just the text highlighting.

Ryan Poolos
  • 18,421
  • 4
  • 65
  • 98