Is there a way to make progressTintColor make a gradient one? Specifically I would like to make it a gradient color from green to red – standard temperature mode.
Adding sublayer didn’t work as it put the layer “behind” the view:
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = self.testBar.bounds;
gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor greenColor] CGColor], (id)[[UIColor redColor] CGColor], nil];
[self.testBar.layer insertSublayer:gradient atIndex:0];
You could try creating patterned UIColor and set that as the tint color, but I doubt it would work.
Otherwise you will probably need to subclass UIProgressView or build your own UIView subclass. A progress bar isn’t that difficult to draw.