I have a UILabel
called optionsDisplayerBrushSizeLabel
who's text property I want to set to a CGFloat
: brushSizeVal
. I understand that the text property needs to be a string but I don't know how to convert a CGFloat to an NSString
.
views:
504answers:
1I think there should [NSString stringWithFormat: @"%.2f", myFloat]; for floats.
Madhup
2009-12-30 05:25:33
you are entirely correct, I've edited my answer, sorry, a typo.
Ben Gottlieb
2009-12-30 14:10:27