假设现有一NSNumber的变量A,要转换成NSString类型的B
方法如下:
NSNumberFormatter* numberFormatter = [[NSNumberFormatteralloc] init];
B = [numberFormatter stringFromNumber:A];
[numberFormatter release];
时间: 2024-10-07 22:43:15
假设现有一NSNumber的变量A,要转换成NSString类型的B
方法如下:
NSNumberFormatter* numberFormatter = [[NSNumberFormatteralloc] init];
B = [numberFormatter stringFromNumber:A];
[numberFormatter release];