Skip to content

iOS 7 and status bar #13

@alextrs

Description

@alextrs

Looks like there is an issue with the way this plugin moves and resizes webView. In iOS 7 status bar covers the top of main view. You can change this behaviour using this plugin 'com.phonegap.plugin.statusbar' (move webView down 20px), but this plugin after initialization moves webView back to top.
f1a7945e-b853-11e3-8159-2158bead550a
Looks like by changing the following code:

  // Move the webview to the top of the screen.
    webViewFrame.origin.y = 0; 
 ...
webViewFrame.size.height = superViewFrame.size.height - bannerViewFrame.size.height;

To:

  // Move the webview to the top of the screen.
    if ([[UIDevice currentDevice].systemVersion floatValue] >= 7)
      webViewFrame.origin.y = 20;
    else
      webViewFrame.origin.y = 0;
   ...
      webViewFrame.size.height = superViewFrame.size.height - webViewFrame.origin.y - bannerViewFrame.size.height;

Resolves the issue, but I'm not sure what else it can break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions