choise
choise

Reputation: 25244

syntax highlight with objective-c

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!

Upvotes: 2

Views: 1241

Answers (3)

Mugunth
Mugunth

Reputation: 14499

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

Upvotes: 0

Colin Barrett
Colin Barrett

Reputation: 4451

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.

Upvotes: 3

John Feminella
John Feminella

Reputation: 311476

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.)

Upvotes: 0

Related Questions