I want to create a background view that has top right corner and bottom left corner gradients How do I achieve this ?
I have this code
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = self.bounds;
gradient.colors = [NSArray arrayWithObjects: (id)[[UIColor whiteColor] CGColor],(id)[[UIColor blackColor] CGColor], nil];
gradient.startPoint = CGPointZero;
[self.layer insertSublayer:gradient atIndex:0];
but it doesnt do what i want, and I don't know how to make it do what I want.
current result:
The desired result is: