ios - Getting Error after updating to XCode 5.1 -
pcseqaudiobar
hi, developing application uses pcseqaudiobar
, working fine on xcode 5.0.2 , after updating 5.1, started getting error.. no more can't compile code or deploy or anything…
incompatible pointer types passing retainable parameter of type 'cfarrayref' (aka 'const struct __cfarray *')to cf function expecting 'const cgfloat *' (aka 'const float *') type
i getting error on line…
cggradientref _gradientref = cggradientcreatewithcolorcomponents(rgb, (__bridge cfarrayref) colors, null, sizeof(colors) / (sizeof(colors[0]) * 4));
please help… in advance..
you need pass cgfloat
array , not nsarray
.
ex:
static const cgfloat colors [] = { 0.894, 0.894, 0.894, 1.0, 0.694, 0.694, 0.694, 1.0 };
more on api apple docs,
the number of items in array should product of count , number of components in color space. example, if color space rgba color space , want use 2 colors in gradient (one starting location , ending location), need provide 8 values in components—red, green, blue, , alpha values first color, followed red, green, blue, , alpha values second color.
Comments
Post a Comment