gpt4 book ai didi

swift - 如何在 swift 中创建一个 SKViaPoint 数组 - Skobbler API

转载 作者:搜寻专家 更新时间:2023-11-01 07:26:43 25 4
gpt4 key购买 nike

我想用多个 viaPoints 计算一条路线。

    let route = SKRouteSettings()
route.startCoordinate = self.userLocation
route.destinationCoordinate = endCheckpoint.location.coordinate
route.viaPoints = viaPointsArray
SKRoutingService.sharedInstance().calculateRoute(route)

但是我不能申报SKViaPoint。类声明似乎丢失了,因为我收到“当我尝试声明变量时使用未解析的标识符‘SKViaPoint’”

有什么我想念的吗?我记得当我在 Objective C 中工作时,我需要特别导入 SKViaPoint.h this is the old question about it

那么我应该在swift中做什么呢?

最佳答案

Swift 实现缺少一些导入(SKViaPoint 就是其中之一)。

参见 this修复问题

关于swift - 如何在 swift 中创建一个 SKViaPoint 数组 - Skobbler API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35608609/

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