iOS: How to draw text curving along a UIBezierPath?

我是研究僧i 提交于 2019-12-21 20:43:38

问题


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.


回答1:


You can see the sample code in my Github, the ArcText.




回答2:


Someone just pointed me to this, which appears to answer my question: Curve text on existing circle

My apologies for the duplication.



来源:https://stackoverflow.com/questions/23948258/ios-how-to-draw-text-curving-along-a-uibezierpath

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