[Solved] ios UIView for complete viewController frame [closed]
-(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 … Read more