加入core text例子的图片

This commit is contained in:
卢克
2013-03-19 15:10:48 +08:00
parent 44ddb0070a
commit e601172580
+3
View File
@@ -150,6 +150,9 @@ CFMutableAttributedStringRef和NSMutableAttributedString就是其中的一对,
callbacks的结构体为CTRunDelegateCallbacks,主要是包含一些回调函数,比如有返回当前run的ascent,descent,width这些值的回调函数,至于函数中如何鉴别当前是哪个run,可以在CTRunDelegateCreate的第二个参数来达到目的,因为CTRunDelegateCreate的第二个参数会作为每一个回调调用时的入参。
###三.Core Text实战
这里使用Core Text实现一个和之前NSTextView显示类似的图文混排的例子。
![](http://ww4.sinaimg.cn/large/65cc0af7gw1e2v3mj0xsrj.jpg)
直接贴上代码大家体会下: