标签 uiimage 下的文章

来张渐变色的圆角图吧

可以控制垂直或者水平方向渐变, 其实给角度也可以, 先放着吧.

UIImage+LinearGradientColor.h

+ (UIImage *)as_imageWithLinearGradientColors:(NSArray *)colors;
+ (UIImage *)as_imageWithLinearGradientColors:(NSArray *)colors vertical:(BOOL)vertical;
+ (UIImage *)as_imageWithLinearGradientColors:(NSArray *)colors size:(CGSize)size;
+ (UIImage *)as_imageWithLinearGradientColors:(NSArray *)colors postions:(NSArray *)positions size:(CGSize)size;
+ (UIImage *)as_imageWithLinearGradientColors:(NSArray *)colors size:(CGSize)size vertical:(BOOL)vertical;
+ (UIImage *)as_imageWithLinearGradientColors:(NSArray *)colors postions:(NSArray *)positions size:(CGSize)size vertical:(BOOL)vertical;
+ (UIImage *)as_imageWithLinearGradientColors:(NSArray *)colors postions:(NSArray *)positions size:(CGSize)size vertical:(BOOL)vertical cornerRadius:(CGFloat)cornerRadius borderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth corners:(UIRectCorner)corners;

- 阅读剩余部分 -