I am using this code from a guy
in the middle of this code, we have
- (NSString *)hexStringFromColor {
return [NSString stringWithFormat:@"%0.6X", self.rgbHex];
}
This was working fine until Xcode 4.4. Now, I see this error:
format specifies type unsigned int but the argument has type UInt32 (aka unsigned long).
Why is Xcode complaining in 4.4 but not before? what specifier should I use?
thanks.
Since
rgbHexseems to be an unsigned long, the correct format specifier is@"%0.6lX"wherelstands forlong.List of iOS String Format Specifiers.