How is it possible in Swift to draw a line where each point can have a different color?
So let's say I have some data incoming which represents the color value of each dot in a line. How can I accomplish that? If I use UIBezierPath, I have a Path and I can only give the path a color. For my case, I have to make 600 Paths ( each dot a Path ) to get, what I would like to have.
Is there a simpler way?
Thank you very much!
EDIT: I've tried to create a 1x1 UIBezierPath and a CAShapeLayer for each. It works, but the whole app gets very very slow, so there must be a simpler or faster method, does anyone know a solution?