cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spurreiter <...@git.apache.org>
Subject [GitHub] cordova-plugin-statusbar pull request #:
Date Thu, 19 Oct 2017 19:44:01 GMT
Github user spurreiter commented on the pull request:

    https://github.com/apache/cordova-plugin-statusbar/commit/fff289c0b8a7d0eb5b94f06d8ace9733054185bd#commitcomment-25084731
  
    First of all I am not an iOS developer, but IMHO the change does not set `frame.origin.y`
if `isIOS11` and `statusBarOverlaysWebView` is set for wrong SDK version < 110000
    
    ```
      if (isIOS7) {
        ...
        if (!self.statusBarOverlaysWebView)
          ...
        } else { 
          if (isIOS11) { //< true
    #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
            // compiler strips code ... frame.origin.y is unset
    #endif
          } else { 
            frame.origin.y = height >= 20 ? height - 20 : 0; //< never reaches here
          }
        }
      }
    ```
    
    So wouldn't it be better to do?
    
    ```
      if (isIOS7) { 
        ...
        if (!self.statusBarOverlaysWebView)
          ...
        } else { 
          frame.origin.y = height >= 20 ? height - 20 : 0;
    #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
          if (isIOS11) {
            if (@available(iOS 11.0, *)) {
              ...
            } 
          }
    #endif
        }
      }
    ```
    



---

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


Mime
View raw message