You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/06/12 06:08:20 UTC

[GitHub] [cordova-plugin-inappbrowser] mtlehtin commented on issue #301: Issue with status bar on iPhone X when toolbar is at the top (v3.0.0)

mtlehtin commented on issue #301:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/301#issuecomment-643084593


   Hi, sorry not for answering for these. I've not been involved in the project anymore.
   
   But as for the background-color these are the code changes that i made in our internal fork:
   
   CDVInAppBrowserOptions.h: Expose the options:
   ```
   @property (nonatomic, assign) BOOL statusbarlightcontent;
   @property (nonatomic, copy) NSString* backgroundcolor;
   ```
   
   CDVWKInAppBrowser.m:
   ```
   - (void)createViews
   {
     // ...
   
     // Set background color if user sets it in options
     if (_browserOptions.backgroundcolor != nil) {
       self.view.backgroundColor = [self colorFromHexString:_browserOptions.backgroundcolor];
     } else {
       self.view.backgroundColor = [UIColor whiteColor];
     }
   
     [self.view addSubview:self.toolbar];
     [self.view addSubview:self.addressLabel];
     [self.view addSubview:self.spinner];
   }
   
   - (UIStatusBarStyle)preferredStatusBarStyle
   {
       return _browserOptions.statusbarlightcontent ? UIStatusBarStyleLightContent : UIStatusBarStyleDefault;
   }
   ```
   
   Usage in the app:
   ```
   window.cordova.InAppBrowser.open(url, target, 'backgroundcolor=#000000,statusbarlightcontent=yes|no')
   ```
   


----------------------------------------------------------------
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



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