Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Map Freezes on iOS 7 with Google Maps SDK 1.4

I've been seeing a strange issue using Google Maps SDK 1.4 (and 1.2... probably others) on iOS 7 beta 4 and 5.

After a brief time of zooming and panning on a device running iOS 7 beta 4 or 5, my GMSMapView will stop responding to gestures. It wont zoom or pan or do anything when you touch it.

When this happens, every other interface element present on screen will remain functional. Programmatically removing and adding the map from the view will re-enable the map. Rotating the device does not affect the map. It happens only on a device running the iOS 7 beta and not on a simulator running iOS 7. Running the same app on an iOS 5.1 and 6.x device will not reproduce this issue.

Has anyone else had an issue like this? I am not a seasoned iOS developer, so I could be missing something simple.

Thanks a bunch!

like image 280
utn Avatar asked Aug 13 '13 22:08

utn


2 Answers

GMSMapView(UIViewController) on UINavigationController. Insert this code in viewDidLoad method.

-(void)viewDidLoad {

    [super viewDidLoad];

    // iOS7   add this code  
    if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
        self.navigationController.interactivePopGestureRecognizer.enabled = NO;
    }

.... your codes

}
like image 79
wac Avatar answered Sep 21 '22 14:09

wac


Download the latest version of Google Maps SDK. This issue has been solved in Version 1.8.0 - May 2014.

Check the release notes.

like image 44
Shamsiddin Saidov Avatar answered Sep 21 '22 14:09

Shamsiddin Saidov