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:
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).
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
Post a Comment