File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ typedef NS_ENUM(NSInteger, QMUIImageResizingMode) {
5252typedef NS_ENUM (NSInteger , QMUIImageGradientType) {
5353 QMUIImageGradientTypeHorizontal,
5454 QMUIImageGradientTypeVertical,
55- QMUIImageGradientTypeLeftTilt ,
56- QMUIImageGradientTypeRightTilt ,
55+ QMUIImageGradientTypeTopLeftToBottomRight ,
56+ QMUIImageGradientTypeTopRightToBottomLeft ,
5757 QMUIImageGradientTypeRadial,
5858};
5959@interface UIImage (QMUI)
@@ -320,7 +320,7 @@ typedef NS_ENUM(NSInteger, QMUIImageGradientType) {
320320/* *
321321 创建一个渐变图片,支持线性、径向。
322322 @param colors 渐变的颜色,不能为空,数量必须与 locations 数量一致(除非 locations 为 nil)
323- @param type 渐变的类型,可选为水平、垂直、径向、左上至右下倾斜 leftTilt、右上倾斜至左下倾斜 rightTilt
323+ @param type 渐变的类型,可选为水平、垂直、径向、左上至右下、右上至左下
324324 @param locations 渐变变化的位置,数量必须与 colors 一致,值为 [0.0-1.0] 之间的 CGFloat。如果参数传 nil 则默认为 @[@0, @1]
325325 @param size 图片的尺寸,如果是径向渐变,宽高不相等时会变成椭圆的渐变。
326326 @param cornerRadius 四个角的圆角值的数组,长度必须为4,顺序分别为[左上角、左下角、右下角、右上角]
Original file line number Diff line number Diff line change @@ -632,10 +632,10 @@ + (UIImage *)qmui_imageWithGradientColors:(NSArray<UIColor *> *)colors type:(QMU
632632 } else if (type == QMUIImageGradientTypeVertical) {
633633 startPoint = CGPointMake (0 , 0 );
634634 endPoint = CGPointMake (0 , size.height );
635- }else if (type == QMUIImageGradientTypeLeftTilt ){
635+ }else if (type == QMUIImageGradientTypeTopLeftToBottomRight ){
636636 startPoint = CGPointMake (0 , 0 );
637637 endPoint = CGPointMake (size.width , size.height );
638- }else if (type == QMUIImageGradientTypeRightTilt ){
638+ }else if (type == QMUIImageGradientTypeTopRightToBottomLeft ){
639639 startPoint = CGPointMake (size.width , 0 );
640640 endPoint = CGPointMake (0 , size.height );
641641 }
You can’t perform that action at this time.
0 commit comments