Hello,
I am developing an iPhone app and are using xCode to do "Build and analyze". I get the message "Receiver in expresseion is a garbage value" pointing to the line of the return-row in my bode below:
-(UIColor*)getLevelColor{
UIColor* tempCol;
if (level==4) {
tempCol= [[UIColor alloc] initWithRed:0.39f green:0.82f blue:0.32f alpha:1.0f];
}else if (level==5) {
tempCol= [[UIColor alloc] initWithRed:0.61f green:0.68f blue:0.83f alpha:1.0f];
}else if (level==6) {
tempCol= [[UIColor alloc] initWithRed:0.90f green:0.68f blue:0.99f alpha:1.0f];
}else if (level==7) {
tempCol= [[UIColor alloc] initWithRed:0.68f green:0.97f blue:0.99f alpha:1.0f];
}
return [tempCol autorelease];
}
How come I get this and how do I fix it so I don't get the message?
Thanks in advance!
Niklas