ios - 应用挂起 GMSMapView 分配

标签 ios google-maps-sdk-ios

我有一个嵌入在 UINavigationController 中的 View Controller ,该 UINavigationController 嵌入在 UITabBarController 中:

self.find = [[UINavigationController alloc] initWithRootViewController:[[Find alloc] init]];
NSMutableArray *tabViewControllers = [[NSMutableArray alloc] init];
[tabViewControllers addObject:self.find];
[self setViewControllers:tabViewControllers];

在那个 View Controller 中,我试图分配一个 GMSMapView 实例。

self.mapView = [[GMSMapView alloc] initWithFrame:CGRectZero];

我使用的是 iOS Google Maps SDK 1.9.1 版(最新版)。在 iOS7 中一切都运行良好,但现在我已经升级到 iOS8,当调试器到达上面的行时 - 它永远不会返回并且应用程序挂起。

最佳答案

尝试使用 - [GMSMapView mapWithFrame:相机:]

方法代替。它可能会起作用。

关于ios - 应用挂起 GMSMapView 分配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28034866/

相关文章:

ios - 如何使用 use_frameworks cocoa pods 和 Google SDK

javascript - 如何自动检测是否需要iScroll?

ios - 异常 :Google Maps SDK for iOS must be initialized via [GMSServices provideAPIKey:. ..] 使用前

ios - 如何以编程方式打开和关闭后台获取

ios - 在 Swift 中实现搜索文本框

iOS Google Maps SDK,无法收听 GMSMarker 点击事件

ios - 适用于 iOS 的 Google Maps SDK 与其高级版本之间有什么区别吗?

swift - GMSMapView 上未显示业务 POI,未调用 didTapPOIWithPlaceID

ios - POST 请求 Swift 3.0 Alamofire

ios - Swift 协议(protocol)和多态性