Objective-C - Delay open view iOS 7.1

不打扰是莪最后的温柔 提交于 2020-01-14 03:30:27

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/26059470/objective-c-delay-open-view-ios-7-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!