Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 87FEA200CAC for ; Mon, 19 Jun 2017 10:37:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 86F06160BE4; Mon, 19 Jun 2017 08:37:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CC7FD160BE1 for ; Mon, 19 Jun 2017 10:37:05 +0200 (CEST) Received: (qmail 51476 invoked by uid 500); 19 Jun 2017 08:37:05 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 51465 invoked by uid 99); 19 Jun 2017 08:37:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2017 08:37:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8A6B21A0862 for ; Mon, 19 Jun 2017 08:37:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id IwpK4Opf-guD for ; Mon, 19 Jun 2017 08:37:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1C7D05FCB5 for ; Mon, 19 Jun 2017 08:37:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 42E5FE08F4 for ; Mon, 19 Jun 2017 08:37:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2E42F24009 for ; Mon, 19 Jun 2017 08:37:00 +0000 (UTC) Date: Mon, 19 Jun 2017 08:37:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-12367) Modernize styling of iOS InAppBrowser view MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Jun 2017 08:37:06 -0000 [ https://issues.apache.org/jira/browse/CB-12367?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D160536= 23#comment-16053623 ]=20 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#discussi= on_r122648718 =20 --- 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 =3D [[UIBarButtonItem alloc] = initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil a= ction:nil]; + UIBarButtonItem* fixedSpaceButton =3D [[UIBarButtonItem alloc] ini= tWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:= nil]; + fixedSpaceButton.width =3D 20; =20 - CGRect webViewBounds =3D self.view.bounds; - BOOL toolbarIsAtBottom =3D ![_browserOptions.toolbarposition isEqu= alToString:kInAppBrowserToolbarBarPositionTop]; - webViewBounds.size.height -=3D _browserOptions.location ? FOOTER_H= EIGHT : TOOLBAR_HEIGHT; - self.webView =3D [[UIWebView alloc] initWithFrame:webViewBounds]; + self.webView =3D [self buildWebView]; + self.spinner =3D [self buildSpinner]; + self.toolbar =3D [self buildToolbar]; + + self.addressLabel =3D [self buildAddressLabel]; + self.addressBar =3D [self buildAddressBar:self.addressLabel]; =20 - self.webView.autoresizingMask =3D (UIViewAutoresizingFlexibleWidth= | UIViewAutoresizingFlexibleHeight); + self.closeButton =3D [self buildCloseButton]; + self.forwardButton =3D [self buildForwardButton]; + self.backButton =3D [self buildBackButton]; + + [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, se= lf.backButton, fixedSpaceButton, self.forwardButton]]; + + self.view.backgroundColor =3D [UIColor whiteColor]; + + if (IsAtLeastiOSVersion(@"7.0")) { --- End diff -- =20 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.=20 =20 To support older iOS versions (so users can fall back to older plugin v= ersions for their platform version), you can add engine tag support like so= :=20 1. https://github.com/phonegap/phonegap-plugin-push/blob/464636b9ae257a= fc712cfebcc1ed11425590c509/plugin.xml#L14-L18 2. https://github.com/phonegap/phonegap-plugin-push/blob/464636b9ae257a= fc712cfebcc1ed11425590c509/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 configuratio= n improvements to the iOS InAppBrowser view, along with a little refactorin= g 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 s= ubviews > * gives the {{addressLabel}} a wrapping view to provide flexibility of ba= ckground color / padding > * changes the default toolbar style from {{UIBarStyleBlackOpaque}} to {{U= IBarStyleDefault}} to match the system default > * adds a {{toolbarstyle}} configuration option that accepts {{default}} o= r {{black}} > * sets the status bar style and background color to match the {{toolbarst= yle}}, so that top toolbars can blend nicely into the status bar > * replaces the unicode navigation arrows (=E2=97=84=E2=96=BA) 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 rende= red in the default iOS blue, or in white when {{toolbarstyle=3Dblack}} is s= et. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org