【问题标题】:App hangs on GMSMapView allocation应用程序挂起 GMSMapView 分配
【发布时间】:2015-01-19 22:50:56
【问题描述】:

我有一个嵌入在 UINavigationController 中的视图控制器,该控制器嵌入在 UITabBarController 中:

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

在那个视图控制器中,我正在尝试分配一个 GMSMapView 实例。

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

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

【问题讨论】:

  • 我实际上将分配转移到了应用程序委托,它也挂在那里。也许这是因为我在 iOS8 上运行了一个越狱的设备?

标签: ios google-maps-sdk-ios


【解决方案1】:

尝试使用 - [GMSMapView mapWithFrame:camera:]

方法。它可能会起作用。

【讨论】:

  • 感谢您的建议 - 这就是我必须开始的 - 没用。我认为这与我是升级到 IOS 8 的越狱设备有关
  • 哦,不过不确定!
猜你喜欢
  • 1970-01-01
  • 2017-02-08
  • 1970-01-01
  • 2011-07-04
  • 2011-02-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多