Core Text examples for iPhone/iPad

不打扰是莪最后的温柔 提交于 2019-12-02 16:01:28

I have written a small project on Github that provides an Objective-C wrapper for Core Text: https://github.com/akosma/CoreTextWrapper In particular, it takes any string and renders it over multiple pages, with multiple columns each page. Hope it helps!

You can find an example of column layout tweaked to work with iPhone/iPad here: http://foobarpig.com/iphone/coretext-example-column-layout-with-correctly-inverted-text.html

kennytm

Core Text is a public framework on the Mac OS X. Any examples that work on the Mac, should be usable on the iPhone/iPad too.

See Core Text Programming Guide: Common Operations.

I implemented a class named OHAttributedLabel to create a UILabel that can draw NSAttributedString. This class uses CoreText for the whole rendering part, you can use this as a start if needed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!