(iOS) Bug fix: Iphonex ionic 1 navbar touch event not working
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.2.3" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.2.4-beta-20180207-1808" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
src/ios/GoogleMaps/MyPluginLayer.m
src/ios/GoogleMaps/MyPluginLayer.m
NSArray *subviews = [self.webView.superview subviews];
for (int i = ((int)[subviews count] - 1); i >= 0; i--) {
subview = [subviews objectAtIndex: i];
+ //NSLog(@"--->subview[%d] = %@", i, subview);
// we only want to check against other views
if (subview == self.pluginScrollView) {
continue;
continue;
}
- UIView *hit = [subview hitTest:point2 withEvent:event];
+ UIView *hit = [subview hitTest:point withEvent:event];
if (hit) {
if (subview == self.webView) {
}
if (self.pluginScrollView.debugView.mapCtrls == nil || self.pluginScrollView.debugView.mapCtrls.count == 0) {
// Assumes all touches for the browser
+ //NSLog(@"--->browser!");
return [self.webView hitTest:point withEvent:event];
}
if (CGRectContainsPoint(rect, point)) {
clickedDomId = [self findClickedDom:@"root" withPoint:point isMapChild:NO overflow:nil];
- point2 = CGPointMake(point.x - mapCtrl.view.frame.origin.x, point.y - mapCtrl.view.frame.origin.y);
+ point2 = CGPointMake(point.x - mapCtrl.view.frame.origin.x - self.webView.frame.origin.x, point.y - mapCtrl.view.frame.origin.y - self.webView.frame.origin.y);
//NSLog(@"--->clickedDomId = %@", clickedDomId);
if ([mapCtrl.mapDivId isEqualToString:clickedDomId]) {
// If user click on the map, return the mapCtrl.view.
return hitView;
} else {
- return [self.webView hitTest:point2 withEvent:event];
+ //NSLog(@"--->browser!");
+ return [self.webView hitTest:point withEvent:event];
}
}

(iOS) Bug fix: Iphonex ionic 1 navbar touch event not working #2055