Hi Guys,
i'm looking for a objective-c class that supports syntax hightlighting a string.
is there something like that existing?
this should work on iphone!
Hi Guys,
i'm looking for a objective-c class that supports syntax hightlighting a string.
is there something like that existing?
this should work on iphone!
You'll have to do this yourself, unfortunately. But if you check iPhone OS 3.2, there are some helpful bits in there. (There is an NDA in place, so more can't be revealed directly in this public area. Check out Apple's dev forums.)
Firstly, it really depends on what programming language you need to process, so you should include that.
Secondly, while I don't know of any syntax highlighters that are written in C or ObjC, there are several written in JS. You could load up the code in a UIWebView and run the JS syntax highlighter on it. That would probably work pretty well.
Though CoreText precisely does what you want in Mac OS X, It's not yet available on iPhone OS 3.1.X. However, Syntax highlighting is far more easier if you use javascript based highlighter as pointed by Colin