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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to