[英]NSTextView -(void) setMarkedTextAttributes: method how to set which text is marked?
NSTextView有一個
-(void)setMarkedTextAttributes:
方法。
但是我可以通過程序標記文本NSRanges嗎? 我可以像選擇NSRanges一樣標記文本嗎?
謝謝你的幫助。
是的,您可以使用API在特定范圍內標記文本
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange
有關更多參考,請查看此apple doc: NSTextInput協議參考
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.