I'm taking a hex color value received as a string and converting it to an int so that I can get the proper hex values. I have the following code underneath my imports:
@implementation NSString (HexIntValue)
- (unsigned int)hexIntValue
{
NSScanner *scanner;
unsigned int result;
scanner = [NSScanner scannerWithString: self];
[scanner scanHexInt: &result];
return result;
}
@end
and then the function is called on a string here:
unsigned int x = (int)[globalBGColor hexIntValue];
Everything works fine, but I really want to get rid of the warning because I'm more or less prepared to submit my app.
Thanks!