ColorSense-for-Xcode
ColorSense-for-Xcode copied to clipboard
`-Wconversion` compliant floats
When using this wonderful plugin, code is generated like so:
[UIColor colorWithRed:0.065 green:0.576 blue:0.865 alpha:1.000];
This will cause warnings if -Wconversion
is on:
error: implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float') [-Werror,-Wconversion]
It can be fixed with a simple change:
[UIColor colorWithRed:0.065f green:0.576f blue:0.865f alpha:1.000f];
ColorSense should use the later format, with f
type specifiers.