//
//  UIColor+Gradient.h
//  YSNewMessageModule
//
//  Created by yanchao on 2019/4/2.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


typedef NS_ENUM(NSInteger, GradientChangeDirection)
{
    GradientChangeDirectionLevel,//水平方向
    GradientChangeDirectionVertical,//垂直方向渐变
    GradientChangeDirectionUpwardDiagonalLine,//主对角线方向渐变
    GradientChangeDirectionDownDiagonalLine,//副对角线方向渐变
};

@interface UIColor (Gradient)


/*    size:渐变区域的尺寸  direction:渐变方向 startColor:开始颜色   endColor:结束颜色 */
+ (instancetype)colorGradientChangeWithSize:(CGSize)size direction:(GradientChangeDirection)direction startColor:(UIColor*)startcolor endColor:(UIColor*)endColor;

@end

NS_ASSUME_NONNULL_END
