cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [02/11] cordova-plugin-statusbar git commit: CB-10047 fix iOS 8 deprecated warnings
Date Fri, 15 Apr 2016 20:49:48 GMT
CB-10047 fix iOS 8 deprecated warnings

Removed all references to self.viewController.interfaceOrientation,
they weren’t really used on invertFrameIfNeeded and are deprecated on
iOS 8
Removed orientation param on invertFrameIfNeeded as it wasn’t being
used.

closes #26


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/commit/47f24546
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/tree/47f24546
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/diff/47f24546

Branch: refs/heads/2.1.x
Commit: 47f245462d1438bd783d503042de8dc225e0af2e
Parents: 241577c
Author: Julio César <jcesarmobile@gmail.com>
Authored: Mon Feb 22 19:41:22 2016 +0100
Committer: Julio César <jcesarmobile@gmail.com>
Committed: Mon Feb 22 19:49:18 2016 +0100

----------------------------------------------------------------------
 src/ios/CDVStatusBar.m | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-statusbar/blob/47f24546/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m
index 4077e36..bab37a2 100644
--- a/src/ios/CDVStatusBar.m
+++ b/src/ios/CDVStatusBar.m
@@ -190,7 +190,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
         statusBarFrame.origin.y = 0;
     }
 
-    statusBarFrame = [self invertFrameIfNeeded:statusBarFrame orientation:self.viewController.interfaceOrientation];
+    statusBarFrame = [self invertFrameIfNeeded:statusBarFrame];
 
     _statusBarBackgroundView = [[UIView alloc] initWithFrame:statusBarFrame];
     _statusBarBackgroundView.backgroundColor = _statusBarBackgroundColor;
@@ -198,7 +198,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
     _statusBarBackgroundView.autoresizesSubviews = YES;
 }
 
-- (CGRect) invertFrameIfNeeded:(CGRect)rect orientation:(UIInterfaceOrientation)orientation
{
+- (CGRect) invertFrameIfNeeded:(CGRect)rect {
     // landscape is where (width > height). On iOS < 8, we need to invert since frames
are
     // always in Portrait context
     if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])
&& (rect.size.width < rect.size.height)) {
@@ -422,7 +422,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
                 // from the current one. Therefore we need to expand the statusBarBackgroundView
as well to the
                 // statusBar's current size
                 CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
-                statusBarFrame = [self invertFrameIfNeeded:statusBarFrame orientation:self.viewController.interfaceOrientation];
+                statusBarFrame = [self invertFrameIfNeeded:statusBarFrame];
                 CGRect sbBgFrame = _statusBarBackgroundView.frame;
                 sbBgFrame.size = statusBarFrame.size;
                 _statusBarBackgroundView.frame = sbBgFrame;
@@ -444,7 +444,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
     
     CGRect bounds = [[UIScreen mainScreen] bounds];
     
-    bounds = [self invertFrameIfNeeded:bounds orientation:self.viewController.interfaceOrientation];
+    bounds = [self invertFrameIfNeeded:bounds];
     
     if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]))
{
         self.viewController.view.frame = bounds;
@@ -455,7 +455,7 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
     if (!self.statusBarOverlaysWebView) {
         
         CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
-        statusBarFrame = [self invertFrameIfNeeded:statusBarFrame orientation:self.viewController.interfaceOrientation];
+        statusBarFrame = [self invertFrameIfNeeded:statusBarFrame];
         
         CGRect frame = self.webView.frame;
         frame.origin.y = statusBarFrame.size.height;


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


Mime
View raw message