Rendering CoreText within an irregular shape

前端 未结 1 1428
囚心锁ツ
囚心锁ツ 2021-01-05 21:43

I\'m looking for guidance on implementing a view that renders an NSAttributedString within a polygon with holes, wrapping and reflowing text to fit the geometry

相关标签:
1条回答
  • 2021-01-05 22:35

    I wrote a blog post about achieving text wrap with Core Text:

    http://blog.amyworrall.com/post/11098565269/text-wrap-with-core-text

    The feature is new in iOS 4.3 and MacOS X Lion. You can now firstly draw inside non-rectangular paths, and secondly pass in other paths to mask the flow (i.e. be the holes you wrap around).

    0 讨论(0)
提交回复
热议问题