ios - iOS SDK 7.0 + MKDirections + calculateDirectionsWithCompletionHandler

标签 ios xcode mapkit directions ios7

我正在IOS SDK 7.0中开发MapKit更新的演示应用程序。

我试图通过IOS SDK 7.0在两个地方找到路线b / w。就像您知道的那样,Apple允许在应用程序内获取指导,而无需使用IOS SDK 7.0中的外部API。

当我调用calculateDirectionsWithCompletionHandler时,获取异常。我的代码和错误如下。

[direction calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse *response, NSError *error) {
                NSLog(@"%@",[response description]);
                NSLog(@"%@",[error description]);

            }];

错误:
[CLPlacemark isCurrentLocation]: unrecognized selector sent to instance 0x9c34ab0

谁能帮我解决这个问题?

谢谢

最佳答案

我发现了问题。实际上,我在我的指导请求中传递了CLPlacemark而不是MKPlacemark

谢谢

关于ios - iOS SDK 7.0 + MKDirections + calculateDirectionsWithCompletionHandler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17106503/

相关文章:

ios - WatchOS - presentMediaPlayerControllerWithURL 不播放视频

iPhone : Leave API changing pages

ios - 使用 MKAnnotation 继续下一个 View Controller

ios - 向多个 ViewController 发送数据?

ios - 显示整个 UIPickerView,然后在选择后隐藏 UIPickerView

ios - 在 Swift 上计算我的位置和 MapKit 引脚之间的距离

ios - 自定义注释中以编程方式按钮

ios - 使用 HTTPCookieStorage.shared 在 URLSessionConfiguration.background 中授权失败(cookes 未发送)

ios - 为什么这个空白游戏在 Swift 中有漏洞

ios - 收集 View IOS 中的 UILABEL 换行符