gpt4 book ai didi

ios - 使用 Google Maps iOS SDK 1.4 设置 mapView.delegate

转载 作者:行者123 更新时间:2023-11-29 10:56:55 25 4
gpt4 key购买 nike


我刚刚从 Google Maps iOS SDK 1.3.1 更新到 1.4,现在当我将委托(delegate)设置为 mapView_.delegate = self 时,我的应用程序崩溃了。如果我删除此行,则不会调用我的委托(delegate)方法。

如何在 v 1.4 中设置委托(delegate)?
谢谢

最佳答案

希望您已正确添加 googlemaps 框架和 bundle 。确保你的头文件有

@interface yourViewController : UIViewController<GMSMapViewDelegate>

在您的实现文件中,确保仅在初始化您的 mapView_ 后设置委托(delegate)。应遵循以下顺序:

mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.delegate = self;

关于ios - 使用 Google Maps iOS SDK 1.4 设置 mapView.delegate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17877202/

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