-(void)drawRect:(CGRect)rect{
CGGradientRef gradientRef;
CGColorSpaceRef colorSpaceRef;
CGFloat...locs[2] = {0,1};
CGFloat colors[8] = { 1.0, 0, 0, 1.0, // 前4个为起始颜色的rgba
0, 1, 0, 1.0 };...* cg_nullable components,
const CGFloat * __nullable locations, size_t count);
//创建CGGradientRef...startRadius, CGPoint end, CGFloat endRadius,
CGFunctionRef cg_nullable function, bool extendStart...locs[2] = {0,1};
CGFloat colors[8] = { 1.0, 0, 0, 1.0, // 前4个为起始颜色的rgba
1, 1, 1, 1.0 };