开发者

DrawText in CGRect for PDF

I'm trying to create a PDF and I have some text. It is longer than one line, so I'm not sure how I need to write it int开发者_如何学Pythono my context. Do I calculate a CGRect the size of my text first? From there, how would I do word wrap or things like that in creating a PDF? So far all I've been able to do is to just draw a title at the correct location :-. Thanks.


I recommend using Core Text, as this is a fairly powerful text rendering framework that plays nicely with Quartz. What you're trying to do is easily accomplished using the CTFrame class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜