Core Graphics angle gradient for gauge
问题 I'm trying to apply an angle gradient to the dashes created with the code I've written inside a custom UIView class, as below. Although it needs tweaking, I'm happy with the results it produces so far. Given the input parameters in the view initialisation (below), and a frame of 768 * 768 on an iPad Air2 in portrait mode, it produces the following gauge: First gauge What I'd like to do is to cause each of the dashes to step through a user-defined gradient, e.g. green to red, much like this