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 7435E200CAC for ; Mon, 19 Jun 2017 10:38:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 733A1160BE4; Mon, 19 Jun 2017 08:38:15 +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 BA7ED160BE1 for ; Mon, 19 Jun 2017 10:38:14 +0200 (CEST) Received: (qmail 51917 invoked by uid 500); 19 Jun 2017 08:38:13 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 51901 invoked by uid 99); 19 Jun 2017 08:38:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2017 08:38:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 737BDDFB94; Mon, 19 Jun 2017 08:38:13 +0000 (UTC) From: shazron To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-plugin-inappbrowser pull request #210: CB-12367: Modernize styling o... Content-Type: text/plain Message-Id: <20170619083813.737BDDFB94@git1-us-west.apache.org> Date: Mon, 19 Jun 2017 08:38:13 +0000 (UTC) archived-at: Mon, 19 Jun 2017 08:38:15 -0000 Github user shazron commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/210#discussion_r122649041 --- 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 -- 1. https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#engines-and-engine 2. https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html#specifying-cordova-dependencies --- 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