const static CGFloat onBackgroundColors[8] = {0.390,0.582, 0.925, 1,0.253, 0.410, 0.878,1};//渐变的颜色, 每四个一组,分别对应的是 RGBA
const staticsize_t num_locations = 2;//有多少种颜色
conststatic CGFloat locations[2] = {0.,0.6};//locations指的是每个颜色开始点,范围是 0-1,
CGGradientCreateWithColorComponents(myColorSpace, onBackgroundColors, locations, num_locations);//生成渐变颜色
CGContextDrawLinearGradient(context, _currentGradient, startPoint, endPoint, 0);//将渐变画到clip区块