Can’t create array of coreGraphic gradient colors list
I have an if statement for 2 types of gradients
CGFloat colors[8];
if (YES) {
colors = { //expected expression error
130/255.0f, 42/255.0f, 212/255.0f, 0.3,
50/255.0f, 4/255.0f, 92/255.0f, 0.3
};
}
else {
colors [] = { //expected expression error
1.0, 1.0, 1.0, 1.0,
207/255.0f, 207/255.0f, 207/255.0f, 1.0
};
}
Can someone show me where is my mistake?
You cannot assign array like that. I suggest you to: