【问题标题】:Objective-C - Delay open view iOS 7.1Objective-C - 延迟打开视图 iOS 7.1
【发布时间】:2014-09-26 12:22:00
【问题描述】:

我有一张带标记的地图(GoogleMaps 框架 1.8.1 - iPhone 4S - iOS 7.1)。每次单击标记时,我都需要显示到另一个屏幕。

问题在于,在任何使用地图连接到此视图的屏幕上,它都有 2-3 秒的延迟。在某些情况下,延迟会达到 20 到 30 秒。

代码创建图:

camera = [GMSCameraPosition cameraWithLatitude: locationManager.location.coordinate.latitude
                                     longitude: locationManager.location.coordinate.longitude
                                          zoom: 14];
map = [GMSMapView mapWithFrame: CGRectMake(0,
                                           0,
                                           self.view.frame.size.width,
                                           self.view.frame.size.height)
                                           camera: camera];

代码didTapMarker:

[self performSegueWithIdentifier: @"EntityDetail" sender: self];
return YES;

PS:这不仅发生在点击标记时。发生在与地图相关联的任何屏幕上。

代码viewDidLoad视图控制器segue:

NSString * titleString =[NSString stringWithFormat: @"Title Here"];
    if (titleString.length > 15) {
        self.title = [titleString substringWithRange:NSMakeRange(0, 15)];
    }else{
        self.title = titleString;
    }

即使只需要一个屏幕这么大的延迟。

【问题讨论】:

    标签: ios objective-c google-maps uiviewcontroller


    【解决方案1】:

    经过大量研究和实施,找到了原因。

    解决方案:

    当我们将 Google 地图框架添加到我们的项目时,它会在 框架搜索路径 上的构建设置 中自动创建对框架的引用。 当我们排除框架时,他不会自动删除此引用。

    原来我遇到了 references 使用的框架的旧版本。我删除了这个参考,它运行良好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-21
      • 2013-08-18
      • 1970-01-01
      相关资源
      最近更新 更多