我正在尝试使用Intents框架创建自定义CLPlacemark。
我在文件开头导入了'Intents'。
我找到了这个解决方案:
let waypointLocation = CLLocation(latitude: 50.00, longitude: 8.00)
let waypointName = "Some Name"
let w1 = CLPlacemark.init(location: waypointLocation,
name: waypointName,
postalAddress: nil)
不幸的是,以上代码给了我以下错误信息:
对'member(init(placemark:))'的引用不明确
有什么想法吗?
文档:
- init(location:name:postalAddress:) https://developer.apple.com/reference/corelocation/clplacemark/2132103-init