cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shazron <...@git.apache.org>
Subject [GitHub] cordova-plugin-inappbrowser pull request #210: CB-12367: Modernize styling o...
Date Mon, 19 Jun 2017 08:36:36 GMT
Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/210#discussion_r122648718
  
    --- Diff: src/ios/CDVInAppBrowser.m ---
    @@ -539,115 +545,212 @@ -(void)dealloc {
     - (void)createViews
     {
         // We create the views in code for primarily for ease of upgrades and not requiring
an external .xib to be included
    +    UIBarButtonItem* flexibleSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil action:nil];
    +    UIBarButtonItem* fixedSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
target:nil action:nil];
    +    fixedSpaceButton.width = 20;
     
    -    CGRect webViewBounds = self.view.bounds;
    -    BOOL toolbarIsAtBottom = ![_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop];
    -    webViewBounds.size.height -= _browserOptions.location ? FOOTER_HEIGHT : TOOLBAR_HEIGHT;
    -    self.webView = [[UIWebView alloc] initWithFrame:webViewBounds];
    +    self.webView = [self buildWebView];
    +    self.spinner = [self buildSpinner];
    +    self.toolbar = [self buildToolbar];
    +
    +    self.addressLabel = [self buildAddressLabel];
    +    self.addressBar = [self buildAddressBar:self.addressLabel];
     
    -    self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
    +    self.closeButton = [self buildCloseButton];
    +    self.forwardButton = [self buildForwardButton];
    +    self.backButton = [self buildBackButton];
    +
    +    [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton,
fixedSpaceButton, self.forwardButton]];
    +
    +    self.view.backgroundColor = [UIColor whiteColor];
    +
    +    if (IsAtLeastiOSVersion(@"7.0")) {
    --- End diff --
    
    Any reason we should worry about older iOS versions anymore? The latest iOS platform release
cordova-ios@4.4.0 only supports iOS 9 and up. 
    
    To support older iOS versions (so users can fall back to older plugin versions for their
platform version), you can add engine tag support like so: 
    1. https://github.com/phonegap/phonegap-plugin-push/blob/464636b9ae257afc712cfebcc1ed11425590c509/plugin.xml#L14-L18
    2. https://github.com/phonegap/phonegap-plugin-push/blob/464636b9ae257afc712cfebcc1ed11425590c509/package.json#L33-L51


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message