有办法将NSTextView的textStorage属性设置为我自己的NSTextStorage吗?您可以自定义NSTextContainer,那么有什么方法可以这样做:
NSTextView *myTV = [[NSTextView alloc] initWithFrame:CGFrameMake(0,0,100,100)
withTextStorage:myTextStorage];如果没有,是否有方法在文本视图实例化后交换默认文本存储?这需要通过子类NSTextView来完成吗?
发布于 2013-10-04 21:36:05
除了简单地替换存储中的字符串之外,似乎没有办法替换NSTextStorage对象本身。
发布于 2013-09-23 03:21:16
在文本存储中设置属性化字符串。
[[myTV textStorage] setAttributedString:myTextStorage];https://stackoverflow.com/questions/18951300
复制相似问题