Open andrewhavens opened 9 years ago
+1
For horizontal gradient can add startPoint and endPoint like:
- (void)setBarTintGradientColors:(NSArray *)barTintGradientColors
{
// create the gradient layer
if (self.gradientLayer == nil) {
self.gradientLayer = [CAGradientLayer layer];
self.gradientLayer.opacity = self.translucent ? kDefaultOpacity : 1.0f;
self.gradientLayer.startPoint = CGPointMake(0.0, 0.5);
self.gradientLayer.endPoint = CGPointMake(1.0, 0.5);
}
This library looks like a lifesaver! I need to do something exactly like this (with a translucent gradient), however, I need the gradient to be horizontal, rather than vertical. Is this supported? Or how could I extend this library to support this feature?