You could draw the gradient to an image context, get the pixel buffer for the image, then create a color from that pixel (see this post).
Otherwise, CGGradientRef
is an opaque type, and there isn't any way to get information out of it. For my own apps, I've also created a wrapper object around CGGradientRef
that creates the gradient and stores the colors / locations it was created with.