[ 
https://issues.apache.org/jira/browse/CB-12367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16053623#comment-16053623
 ] 

ASF GitHub Bot commented on CB-12367:
-------------------------------------

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


> Modernize styling of iOS InAppBrowser view
> ------------------------------------------
>
>                 Key: CB-12367
>                 URL: https://issues.apache.org/jira/browse/CB-12367
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-plugin-inappbrowser
>    Affects Versions: 1.6.1
>            Reporter: Reid Beels
>
> I've been working on a branch that brings several visual and configuration 
> improvements to the iOS InAppBrowser view, along with a little refactoring of 
> the view setup code.
> This PR:
> * breaks up the large {{CDVInAppBrowserViewController createView}} method 
> into several smaller helper methods to handle the creation of individual 
> subviews
> * gives the {{addressLabel}} a wrapping view to provide flexibility of 
> background color / padding
> * changes the default toolbar style from {{UIBarStyleBlackOpaque}} to 
> {{UIBarStyleDefault}} to match the system default
> * adds a {{toolbarstyle}} configuration option that accepts {{default}} or 
> {{black}}
> * sets the status bar style and background color to match the 
> {{toolbarstyle}}, so that top toolbars can blend nicely into the status bar
> * replaces the unicode navigation arrows (◄►) with drawn arrows that match 
> those used in Safari
> * adds a {{tintcolor}} configuration option that accepts hex strings like 
> {{F8A027}}. If not provided, or set to {{default}}, controls will be rendered 
> in the default iOS blue, or in white when {{toolbarstyle=black}} is set.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to