objective c - How to add box around NSString inside NSTextView -


i'm working on os x application , i'm pretty stuck @ this. have text inside nstextview , put box around strings (i have ranges substrings).

any ideas?

also, perfect solution create similar xcode has, when type example [nsstring stringwithformat: (nsstring *), ..)]; screenshot: autocomplete suggestions

i'm interested in blue box suggests type expected. appreciated!

this question not entirely related possible duplicate question, since working on ios application different approach.

i'm pretty sure xcode achieves these effects using nstextattachment objects embedded within nsattributedstring instances. (the same sort of effect can seen in nstokenfield control, uses approach).

enter image description here

it's pretty big topic though: need proficient attributed strings, text attachments, nstextattachmentcell class , few other bits , pieces cocoa's text architecture. job made more difficult fact there's little documentation (official or unoffical) doing sort of thing.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -