gpt4 book ai didi

swift - 从 Parse 获取的反向地理编码坐标

转载 作者:行者123 更新时间:2023-11-30 14:06:57 29 4
gpt4 key购买 nike

这是我目前的代码

let point = object["location"] as! PFGeoPoint
let location = CLLocation(latitude: point.latitude, longitude: point.longitude)
cell.locationButton.text = "\((CLLocation(latitude: currLocation!.latitude, longitude: currLocation!.longitude)))"

它返回特定帖子的坐标,这很好。然而,我想要的是将其本质上转换为位置的名称。我为另一个标签执行此操作,但我不太确定如何为这个特定标签执行此操作,因为我已经在 cellforrowatindexpath 函数中。

最佳答案

如果你想将坐标转换为城市名称,你必须实现 CLGeocoder。查看本教程:http://rshankar.com/get-your-current-address-in-swift/

关于swift - 从 Parse 获取的反向地理编码坐标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32255616/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com