How does one convert NSInteger to the NSString datatype?
NSInteger
NSString
I tried the following, where month is an NSInteger:
NSString *inStr = [NSString stringWithFormat:@"%d", [month intValue]];
NSIntegers are not objects, you cast them to long, in order to match the current 64-bit architectures' definition:
long
NSString *inStr = [NSString stringWithFormat: @"%ld", (long)month];
2.1m questions
2.1m answers
60 comments
57.0k users