How does one draw a CGGradient with 3 colors?
I have an array like so:
CFArrayRef colors = (__bridge CFArrayRef) [NSArray arrayWithObjects:(id)lightGradientColor.CGColor,
(id)darkGradientColor.CGColor, (id)lightGradientColor.CGColor,
nil];
but I dont see the dark color in the middle with light on top and bottom sections, but rather just light on top, with dark until the bottom.
Have you tried specifying/verifying the locations of your colors? The range is [0…1]:
note: The locations above should be the same as passing
0for thelocationsparameter.