You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/01/27 21:33:44 UTC

[GitHub] [cordova-plugin-inappbrowser] Huy-Vu commented on issue #575: [iOS] toolbarposition=top will conflict the upper side of inappbrowser webiew

Huy-Vu commented on issue #575: [iOS] toolbarposition=top will conflict the upper side of inappbrowser webiew
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/575#issuecomment-578963820
 
 
   In CDVInAppBrowserNavigationController.m there is a constant setting for status bar height which only applies for devices without the notch. 
   ```
   #define    STATUSBAR_HEIGHT 20.0
   ...
   statusBarFrame.size.height = STATUSBAR_HEIGHT; // line 35
   ```
   I fixed this by using the safeAreaInset available from iOS 11:
   ```
       if (@available(iOS 11.0, *)) {
           statusBarFrame.size.height = UIApplication.sharedApplication.keyWindow.safeAreaInsets.top;
       } else {
           statusBarFrame.size.height = STATUSBAR_HEIGHT;
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org