Skip to content

November 2, 2014

Convert from integer to string in Objective C

by noise

Next example shows you how to convert from integer to string in Objective C using stringWithFormat function.

int anInt = 100;
NSString *aString = [NSString stringWithFormat:@"%d", anInt];
 
NSLog(@"aString = %@", aString);
Read more from Objective C Tips

Leave a Reply

required
required

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments