每当我尝试返回当前位置的纬度/经度坐标时,我的应用程序崩溃,没有解释错误...
NSLog(@"%@", mapView.userLocation.location.coordinate);
Run Code Online (Sandbox Code Playgroud)
我等到电话找到了位置......
mapView.userLocation.location.coordinate是一个结构,而%@格式说明符期望一个对象.这将有效:
NSLog(@"%f, %f", mapView.userLocation.location.coordinate.latitude,
mapView.userLocation.location.coordinate.longitude);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2743 次 |
| 最近记录: |