iOS:如何绘制沿 UIBezierPath 弯曲的文本? [英] iOS: How to draw text curving along a UIBezierPath?
问题描述
我需要以编程方式绘制这样的东西:-
(来源:planetclegg.com)>
除了我的 UIBezierPath 是关闭的 &我需要在跟随曲线时将文本放入其中.我的路径绘制正确,问题是文本.我在网上搜索并阅读了一堆教程,但似乎没有任何解决方案.这在 iOS 中是可能的,如果是,它是如何完成的?相关教程和/或代码片段的链接将不胜感激.
您可以在我的 Github,ArcText
.
I need to programmatically draw something like this:-
(source: planetclegg.com)
Except that my UIBezierPath is closed & I need the text to fit inside it while following the curve. I have my path drawing correctly, the problem is the text. I've searched the 'net and read a bunch of tutorials but nothing seems to provide a solution. Is this possible in iOS, and if so how is it done? Links to relevant tutorials and/or code snippets would be much appreciated.
You can see the sample code in my Github, the ArcText
.
这篇关于iOS:如何绘制沿 UIBezierPath 弯曲的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!