Objective-C - 延迟开放视图iOS 7.1 [英] Objective-C - Delay open view iOS 7.1

查看:117
本文介绍了Objective-C - 延迟开放视图iOS 7.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有标记的地图(GoogleMaps framework 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)
相机:相机];

代码 didTapMarker

  [self performSegueWithIdentifier:@EntityDetailsender:self]; 
返回YES;

PS:这不仅发生在点击标记处。



代码 viewDidLoad view controller segue :

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




$ b

虽然只是一个屏幕这么大的延迟。

$ b

解决方案

经过大量研究和实施后,当我们将Google Maps框架添加到我们的项目中时,它会自动在构建设置中创建对框架的引用。 / strong>上的框架搜索路径
当我们排除框架时,他不会自动删除此引用。



我发现引用 旧版本的框架。我删除引用,并且完美无缺。


I have a map with markers (GoogleMaps framework 1.8.1 - iPhone 4S - iOS 7.1). Every time I click on a marker I need to show to another screen.

The problem is that it has a delay 2-3 seconds on any screen that is connected to this view with map. In some instances the delay reaches 20 to 30 seconds.

Code creation map:

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];

Code didTapMarker:

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

PS: This not only happens at the click of the markers. Happens on any screen that is connected to this with the map.

Code viewDidLoad view controller segue:

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

Even though it only takes a screen this big delay.

解决方案

After much research and implementation found what was causing.

Solution:

When we add the Google Maps framework to our project it creates a reference to framework automatically in Build Settings on Framework search paths. When we exclude the framework he does not remove automatically this reference.

Turns out I came across references the old version of the framework that was using. I removed this reference and it worked perfectly.

这篇关于Objective-C - 延迟开放视图iOS 7.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆