Skip to content

Commit

Permalink
Bug fix #36: iOS 6 Closebar not fully visible
Browse files Browse the repository at this point in the history
  • Loading branch information
wf9a5m75 committed May 9, 2014
1 parent 770542e commit e23d53b
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/ios/GoogleMaps/GoogleMaps.m
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ - (void)showDialog:(CDVInvokedUrlCommand *)command {


int footerHeight = 40;
int headerHeight = 0;
int footerAdjustment = 0;
if ([PluginUtil isIOS7] == false) {
headerHeight = 20;
footerAdjustment = 20;
}

// Calculate the full screen size
Expand All @@ -344,26 +344,24 @@ - (void)showDialog:(CDVInvokedUrlCommand *)command {
if (direction == UIInterfaceOrientationLandscapeLeft ||
direction == UIInterfaceOrientationLandscapeRight) {
pluginRect.size.width = screenSize.size.height;
pluginRect.size.height = screenSize.size.width - footerHeight - headerHeight;
pluginRect.size.height = screenSize.size.width - footerHeight - footerAdjustment;
} else {
pluginRect.size.width = screenSize.size.width;
pluginRect.size.height = screenSize.size.height - footerHeight - headerHeight;
pluginRect.size.height = screenSize.size.height - footerHeight;
}
[self.mapCtrl.view setFrame:pluginRect];

//self.mapCtrl.view.frame = pluginRect;
[self.footer setFrameWithInt:0 top:pluginRect.size.height width:pluginRect.size.width height:footerHeight];
[self.footer setFrameWithInt:0 top:pluginRect.size.height - footerAdjustment width:pluginRect.size.width height:footerHeight];
[self.licenseButton setFrameWithInt:pluginRect.size.width - 110 top:0 width:100 height:footerHeight];
[self.closeButton setFrameWithInt:10 top:0 width:50 height:footerHeight];

// Add the footer
[self.webView addSubview:self.footer];

// Show the map
[self.webView addSubview:self.mapCtrl.view];

[self.mapCtrl updateMapViewLayout];

// Add the footer
[self.webView addSubview:self.footer];

CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];

Expand Down

0 comments on commit e23d53b

Please sign in to comment.