6
2
2
u/datHackerThough Feb 17 '20
One thing I think you don’t discuss in your tutorial is how to input a percentage from a source, and have that appear as a percentage of a ring.
You have 0 as your “no line” and 360 as the full circle. So just bring in your percentage as a decimal and multiply that by 360 to get the right percentage of circle to show.
So 50% is (0.5 * 360) and it’ll show half a circle.
Great tutorial!
0
u/Timmy_the_tortoise Feb 16 '20
This will be very useful for displaying a timer progress in my next app. Thanks!
17
u/sarunw Feb 16 '20
https://sarunw.com/posts/how-to-create-activity-ring-in-swiftui/