Anyone see the issue here?
double lat开发者_如何学CDouble = [latString doubleValue];
double lngDouble = [lngString doubleValue];
CGFloat dist = [self calcDiffDistance:latDouble withPostLng:lngDouble]; // Incompatible types in initialization
- (float)calcDiffDistance:(double)postLat withPostLng:(double)lon1
{
...
}
The typedef
for CGFloat
is double
on a 64-bit system, and float
on a 32-bit system. My guess is you're compiling on a 64-bit system, and are assigning a float
return value to a double
variable.
精彩评论