I know that you can convert a float into a string using
NSString *myString = [NSString stringWithFormat:@"%f", myFloat];
My question is what OTHER methods exist in Objective-C that can do that same?
thanks.
You could use NSNumber
NSString *myString = [[NSNumber numberWithFloat:myFloat] stringValue];
But there's no problem doing it the way you are, in fact the way you have in your question is better.
1.4m articles
1.4m replys
5 comments
56.9k users