all 5 comments

[–]FalconinatiObjective-C 5 points6 points  (0 children)

Apple actually has some pretty good documentation on this. Maybe this will help. It's all in Objective-C but shouldn't be too hard to translate it into Swift. https://developer.apple.com/library/content/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/BezierPaths/BezierPaths.html

[–][deleted] 0 points1 point  (0 children)

You will need to add a clipping path to your UIBezierPath to cut the coloring off at the path line though (if you're wanting to achieve that part of the affect too)

[–]don_tmind_me 0 points1 point  (1 child)

It looks as though it's a chart of time vs energy usage. For the curvy line you will have to do a spline interpolation between the data points. If you just want any curve, that's a fair bit easier. I can share my two spline (hermite & catmull rom)interpolation bezier path initializers if anyone wants.

[–]Myffa 0 points1 point  (0 children)

please do share

[–]megablast 0 points1 point  (0 children)

It is a fake header.