views:

497

answers:

1

Hi, I want to write a simple text editor for iPhone with syntax highlighting support for c,c++. But the problem is, I dont't know how to do this. The first solution I was thinking about, was to go over the text and highlight keywords when the value of the UITextView has changed, but I think that if I got more than 1000lines of code that doesn't work very well.

Thanks for help!

+1  A: 

Check out this answer http://stackoverflow.com/questions/754591/what-is-the-best-way-to-implement-syntax-highlighting-of-source-code-in-cocoa/757301#757301 also there are some tutorials whnen you google "implementing syntax highlighting". Like this one or that one.

texmex5