Skip to content

Commit

Permalink
修改枚举命名
Browse files Browse the repository at this point in the history
  • Loading branch information
xixisplit committed Sep 1, 2021
1 parent 3b1d05a commit 7acd386
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions QMUIKit/UIKitExtensions/UIImage+QMUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ typedef NS_ENUM(NSInteger, QMUIImageResizingMode) {
typedef NS_ENUM(NSInteger, QMUIImageGradientType) {
QMUIImageGradientTypeHorizontal,
QMUIImageGradientTypeVertical,
QMUIImageGradientTypeLeftTilt,
QMUIImageGradientTypeRightTilt,
QMUIImageGradientTypeTopLeftToBottomRight,
QMUIImageGradientTypeTopRightToBottomLeft,
QMUIImageGradientTypeRadial,
};
@interface UIImage (QMUI)
Expand Down Expand Up @@ -320,7 +320,7 @@ typedef NS_ENUM(NSInteger, QMUIImageGradientType) {
/**
创建一个渐变图片,支持线性、径向。
@param colors 渐变的颜色,不能为空,数量必须与 locations 数量一致(除非 locations 为 nil)
@param type 渐变的类型,可选为水平、垂直、径向、左上至右下倾斜 leftTilt、右上倾斜至左下倾斜 rightTilt
@param type 渐变的类型,可选为水平、垂直、径向、左上至右下、右上至左下
@param locations 渐变变化的位置,数量必须与 colors 一致,值为 [0.0-1.0] 之间的 CGFloat。如果参数传 nil 则默认为 @[@0, @1]
@param size 图片的尺寸,如果是径向渐变,宽高不相等时会变成椭圆的渐变。
@param cornerRadius 四个角的圆角值的数组,长度必须为4,顺序分别为[左上角、左下角、右下角、右上角]
Expand Down
4 changes: 2 additions & 2 deletions QMUIKit/UIKitExtensions/UIImage+QMUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,10 @@ + (UIImage *)qmui_imageWithGradientColors:(NSArray<UIColor *> *)colors type:(QMU
} else if(type == QMUIImageGradientTypeVertical) {
startPoint = CGPointMake(0, 0);
endPoint = CGPointMake(0, size.height);
}else if (type == QMUIImageGradientTypeLeftTilt){
}else if (type == QMUIImageGradientTypeTopLeftToBottomRight){
startPoint = CGPointMake(0, 0);
endPoint = CGPointMake(size.width, size.height);
}else if (type == QMUIImageGradientTypeRightTilt){
}else if (type == QMUIImageGradientTypeTopRightToBottomLeft){
startPoint = CGPointMake(size.width, 0);
endPoint = CGPointMake(0, size.height);
}
Expand Down

0 comments on commit 7acd386

Please sign in to comment.