Ios CLLocationDegrees与类型不兼容的表达式';双倍';

Ios CLLocationDegrees与类型不兼容的表达式';双倍';,ios,cllocation,Ios,Cllocation,这个话题说明了一切。为什么我在这两行收到这个错误消息 NSArray *coordinates = [locationDetails[@"coordinates"] componentsSeparatedByString:@","]; CLLocationDegrees *lat = [coordinates[1] doubleValue]; //here is the red arrow <---- NSArray*坐标=[locationDetails[@“坐标”]由字符串分隔的组件

这个话题说明了一切。为什么我在这两行收到这个错误消息

NSArray *coordinates = [locationDetails[@"coordinates"] componentsSeparatedByString:@","];
CLLocationDegrees *lat = [coordinates[1] doubleValue]; //here is the red arrow <----
NSArray*坐标=[locationDetails[@“坐标”]由字符串分隔的组件:@“,”;
CLLocationDegrees*lat=[坐标[1]双值]//这是红色箭头更改此选项:

CLLocationDegrees *lat = [coordinates[1] doubleValue];
致:


去掉星号
CLLocationDegrees
不是一个类,它是一个用于
double
(一种基本类型)的typedef。

wow facepalm。这个小小的“*”偷走了我大约30分钟。
CLLocationDegrees lat = [coordinates[1] doubleValue];