@property(nonatomic,strong)CAGradientLayer* gradientLayer;
self.gradientLayer= [CAGradientLayerlayer];//设置渐变效果
//self.gradientLayer.borderWidth = 0;
self.gradientLayer.frame=CGRectMake(0,0,SCREEN_WIDTH,self.gradientView.bounds.size.height);
self.gradientLayer.colors=@[(__bridgeid)[UIColorclearColor].CGColor,
(__bridgeid)[UIColorblackColor].CGColor];
self.gradientLayer.startPoint=CGPointMake(0,0);
self.gradientLayer.endPoint=CGPointMake(0,1);
//self.gradientLayer.locations = @[@(0.5f) ,@(1.0f)];
[self.view.layeraddSublayer:self.gradientLayer];