Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw text along circular path using SwiftUI

I need some help on how to generate a single line text in a circular path using SwiftUI. I am trying to replicate the curved text in these Image. Is this possible in SwiftUI? Thanks.

like image 326
Mark Bryan Ramirez Avatar asked Feb 13 '20 05:02

Mark Bryan Ramirez


2 Answers

enter image description hereFound a solution to my question. Credits to Tobias Due Munk for posting his prototype for CurvedText using SwiftUI. His solution can be found here https://git.kabellmunk.dk/prototyping-custom-ui-in-swiftui-talk/custom-ui-prototype-in-swiftui.

like image 172
Mark Bryan Ramirez Avatar answered Sep 17 '22 15:09

Mark Bryan Ramirez


No, Swift UI doesn't provide any way to do that as of now. So as @fulvio pointed out you must do it Swift UIKit way .

You can later use UIViewRepresentable to integrate it in your SwiftUI Project Refer Swift UI interfacing with UIKit by Apple Inc.

like image 34
Tilak Maddy Avatar answered Sep 17 '22 15:09

Tilak Maddy