How does one convert NSInteger
to the NSString
datatype?
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:
NSString *inStr = [NSString stringWithFormat: @"%ld", (long)month];