【发布时间】:2010-11-22 16:12:29
【问题描述】:
您好 Stacked-Experts!
我的问题:如何从 CLLocationDegrees 值生成字符串?
尝试失败:
1. NSLog(@"Value: %f", currentLocation.coordinate.latitude); //Tried with all NSLog specifiers.
2. NSNumber *tmp = [[NSNumber alloc] initWithDouble:currentLocation.coordinate.latitude];
3. NSString *tmp = [[NSString alloc] initWithFormat:@"%@", currentLocation.coordinate.latitude];
当我查看 CLLocationDegrees 的定义时,它清楚地表明这是一个双精度:
typedef double CLLocationDegrees;
我在这里缺少什么?这让我发疯了...请帮助拯救我的思想!
提前致谢并致以最诚挚的问候。 //Abeansits
【问题讨论】:
标签: iphone objective-c cocoa-touch nsstring nslog