小编And*_*ard的帖子

在initWithLatitude中放入nsnumber或nsstring:

我也陷入了困境,我正试图把一个NSString或一个NSNumber放进initWithLatitudeCLLocation.如果有人能提供帮助就会很棒.

继承人的代码

CLLocation *location1 = [[CLLocation alloc] initWithLatitude:53.778702 longitude:-0.271887];
CLLocation *location2 = [[CLLocation alloc] initWithLatitude:53.683267 longitude:-0.011330];
label.text = [NSString stringWithFormat:@"Distance in miles: %4.1f", [location1 distanceFromLocation:location2]/1609.344]; 
[location1 release];
Run Code Online (Sandbox Code Playgroud)

我试图取代[[CLLocation alloc] initWithLatitude:53.778702 longitude:-0.271887][[CLLocation alloc] initWithLatitude:lat longitude:lon]

iphone mapkit cllocation ios

2
推荐指数
1
解决办法
3463
查看次数

标签 统计

cllocation ×1

ios ×1

iphone ×1

mapkit ×1