CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame =CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
gradient.colors = [NSArray arrayWithObjects:
(id)[UIColor whiteColor].CGColor,
(id)[UIColor grayColor].CGColor,
(id)[UIColor whiteColor].CGColor,
nil];
[self.view.layer insertSublayer:gradient atIndex:0];