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 C3D41200B5E for ; Wed, 27 Jul 2016 01:46:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C2662160AA5; Tue, 26 Jul 2016 23:46:26 +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 1627D160AA4 for ; Wed, 27 Jul 2016 01:46:25 +0200 (CEST) Received: (qmail 48952 invoked by uid 500); 26 Jul 2016 23:46:25 -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 48939 invoked by uid 99); 26 Jul 2016 23:46:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2016 23:46:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 7D36A188325 for ; Tue, 26 Jul 2016 23:46:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id u3XolmG5h9eB for ; Tue, 26 Jul 2016 23:46:22 +0000 (UTC) Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id C585C5FAE8 for ; Tue, 26 Jul 2016 23:46:21 +0000 (UTC) Received: by mail-qk0-f171.google.com with SMTP id x1so20642393qkb.3 for ; Tue, 26 Jul 2016 16:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=p9974Fry2gsAmWO5XP7/cMQlWQAjWBQAjTzHkSyxtBc=; b=JjU/LwXdrCva/RsfKOJWOvC5z202nZSrfluTFG+TeeHMMxVXT9ALo2ZAQkmslpmvWL DuJ7YPCy0ApW6KpNtcjOJ1RuKH29smXcX/Lriig4/az9URrsfxyIuxOOLnHoTBpevEGT cjQqd8DbKmXSsNpAmepLJwCmMIhixxWt+uJ9hYfOR1V5fhLxOqM6eX5Nu51kGPHwJ4c/ VJNeQ02JhAPq4zAzQI+gmiBb4MqeyMqpQdUnJG7Trvl1BdJxY+k4tndGZDlifl7qN0Nq mhAfYGqcsNhXmQ/KKs4AJ32ndLzG33KYl8fRIBqQ937W9vntBPqsu/WkO3QUBrRVm4Cz 0Rcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=p9974Fry2gsAmWO5XP7/cMQlWQAjWBQAjTzHkSyxtBc=; b=k3KFcGV4lhZXl74QwaxQuux63vs9gNryyh5t+In7ZYbZ5Rj2Mhf9fSptC+pY24KOGt yfFGph6mnuF4hPQ97CIkAeSgx6wDaQ6cL04/n+ydv/8gBxEKFDDIdAECbxwFubJOZXdo hqgKB4pTI8C/St4p4XQ9lqb26PnTcMm3b5MkmITB/bvvzm9ODvcRNS0jpaPvunc4EaZA buLrq7jltUsofA8Luw6Cg+ynnDSwTmrRRxKvPLeEJYKbpzca6gXW5wi2OOpozYHG5UEL X6vo90HumZ6y/PuLoS5f4g6zDU1ewrqSR9Rwjt14xmV+X1yqpPT8uHWrGRuvz5wfejGk 6PHQ== X-Gm-Message-State: AEkooutRuDedVSPOqh6QfCda0lkZ+x3VMytTmvGZL07hU1Csleq4RY7zNom+eEeFCJZVQKQgcwQBrSHQLejMpA== X-Received: by 10.55.179.129 with SMTP id c123mr34249952qkf.50.1469576774829; Tue, 26 Jul 2016 16:46:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.18.169 with HTTP; Tue, 26 Jul 2016 16:45:35 -0700 (PDT) In-Reply-To: References: From: Shazron Date: Wed, 27 Jul 2016 07:45:35 +0800 Message-ID: Subject: Re: feedback on statusbar plugin ios To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=94eb2c0650eaa253b3053892819b archived-at: Tue, 26 Jul 2016 23:46:26 -0000 --94eb2c0650eaa253b3053892819b Content-Type: text/plain; charset=UTF-8 Thanks for all your work on this Julio - we should add the second option for the future. As for the magic number stuff, its fine for now to fix those issues since we have no alternative. On Fri, Jul 8, 2016 at 6:56 AM, julio cesar sanchez wrote: > The statusbar plugin on iOS has had a lot of issues when a modal or popover > was present. > We have been fixing them and adding new ones because the behaviour when a > modal or popover is present is different on different devices and iOS > versions. > We have added a lot of "hacks" to fix a lot of cases. > > Right now, there is only one issue left: > https://issues.apache.org/jira/browse/CB-11191 > > But this issue is impossible to fix with our "hacks" because on the iPhone > the camera is present on landscape and no rotation event is passed to the > webview, so when it's closed the webview is resized and not usable. > > So, I've come up with an idea, what if we forget about all that hacks and > just resize the webview when the modal is disappearing? > > We have 3 choices (that I know) > > 1) Make all plugins that show a modal to post a notification when they are > going to be dismissed, and make the statusbar plugin listen for that > notification. I don't think it's a good option becase it's a lot of work on > a lot of plugins and will add a lot of code. > > 2) Make the CDVViewController to send the notification on viewWillAppear. > This option is better, but will only fix the issue on the next version of > Cordova that includes this code. > > 3) Add a category of CDVViewController or MainViewController that have the > viewWillAppear, and use it to resize the webView. > > > I've edited the plugin to use the 3rd option > > https://github.com/jcesarmobile/cordova-plugin-statusbar/tree/viewcontroller-category-test > > I've been testing and seems to fix all the modal related bugs and removes > all the hacky code. > > Let me know what you think about it or if you know another alternative to > do the same but easier. > > > And I think we should implement the second choice too for future releases, > and maybe with some other methods sending a notification (viewDidAppear, > viewDidDisappear, etc) > > > BTW, as I asked some time ago and didn't get any answer, I bring the topic > again. There are another 2 statusbar issues that can be fixed using a > "magic number" (20 points as statusbar height constant). The first answer > was to not use a "magic number" because apple might change the height on > any moment and break the plugin. iOS 10 hasn't changed it, so I think we > can use this magic number and worry latter if apple changes it on iOS 11 or > 12 or 13, but at least we can have that 2 issues fixed for some years. > > The problems are related to the "extended statusbar" (it's 40 points > instead of 20, so we can't use the real height at that moment and we have > to use 20 as height to fix both issues) > --94eb2c0650eaa253b3053892819b--