Horizontal gradient is working fine. Is there any way to get a vertical color gradient from horizontal gradient? I have seen a related question regarding this where they did this by rotating the frames.
Is there any simpler way to achieve a vertical gradient?
The default startPoint and endPoint would have the gradient display your colors from top to bottom (which in my mind is a vertical gradient). If you want the gradient to display from left to right (again in my mind this is a horizontal gradient), use this code on your CAGradientLayer:
[gradientLayer setStartPoint:CGPointMake(0.0, 0.5)];
[gradientLayer setEndPoint:CGPointMake(1.0, 0.5)];
A 3D transform is unnecessary.