I am beginner for ios and I want to create a UIVew as like Image. You can observe a white color from one place to another place in the attached image. How can I achieve it. Thanks in advance.

I am beginner for ios and I want to create a UIVew as like Image. You can observe a white color from one place to another place in the attached image. How can I achieve it. Thanks in advance.

 
    
     
    
    -(UIView *) returnGradientView {
     UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
     CAGradientLayer *gradient = [CAGradientLayer layer];
     gradient.frame = view.bounds;
     //change your color as you like, I have used black and white
     gradient.colors = @[(id)[UIColor blackColor].CGColor, (id)[UIColor whiteColor].CGColor];
     [view.layer insertSublayer:gradient atIndex:0];
     return view;
}
Edit
this will create an gradient view, upper side white and lower side is black. if you want to make top-bottom or left-right you have to add startPoint and endPoint 
just add two line
gradient.startPoint = CGPointMake(1.0, 0.0);
gradient.endPoint = CGPointMake(0.0, 0.0);
