修改图片地址

This commit is contained in:
卢克
2013-03-19 15:51:16 +08:00
parent 554bb147d9
commit 06e96e29bf
+1 -1
View File
@@ -61,7 +61,7 @@ Printing description of attributedString:
[_textView insertText:attributedString];
{% endhighlight %}
![](http://ww1。sinaimg。cn/bmiddle/65cc0af7gw1e2rnc6to9cj.jpg)
![](http://ww1.sinaimg.cn/bmiddle/65cc0af7gw1e2rnc6to9cj.jpg)
还有就是NSAttributedString提供对所有属性进行遍历的方法,也提供了计算在特定size下渲染实际所占的区域(boundingRectWithSize:options:) 这些这里就不介绍了。
从上面的代码可以看出其实Mac下的富文本的渲染并不是很复杂,只要将Attributed String理解和使用好,其余的事情都交给NSTextView来做了,你完全不用考虑其底层是如何取渲染的。但是在iOS平台上就没有这么幸运了,虽然iOS从3。2开始也提供了NSAttributedString,但是并没有类似NSTextView这样的控件直接来渲染Attributed String。