You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/11/01 22:50:03 UTC

ios commit: CB-12098 - Update supportedInterfaceOrientations return type

Repository: cordova-ios
Updated Branches:
  refs/heads/master 25160f344 -> 69e06b0a8


CB-12098 - Update supportedInterfaceOrientations return type

 This closes #271


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/69e06b0a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/69e06b0a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/69e06b0a

Branch: refs/heads/master
Commit: 69e06b0a854e5a566b38dd021bcdca0e2f65947c
Parents: 25160f3
Author: Sterling <st...@gmail.com>
Authored: Tue Nov 1 11:40:12 2016 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Nov 1 15:48:50 2016 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVAppDelegate.m                   | 4 ++--
 CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h     | 7 ++++++-
 CordovaLib/Classes/Public/CDVViewController.m                | 8 +++++++-
 .../project/__PROJECT_NAME__/Classes/MainViewController.m    | 8 +++++++-
 4 files changed, 22 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/69e06b0a/CordovaLib/Classes/Public/CDVAppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVAppDelegate.m b/CordovaLib/Classes/Public/CDVAppDelegate.m
index 13c2e7b..821b957 100644
--- a/CordovaLib/Classes/Public/CDVAppDelegate.m
+++ b/CordovaLib/Classes/Public/CDVAppDelegate.m
@@ -85,9 +85,9 @@
     return YES;
 }
 
-#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
+#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
 - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
-#else
+#else //CB-12098.  Defaults to UIInterfaceOrientationMask for iOS 9+
 - (UIInterfaceOrientationMask)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
 #endif
 {

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/69e06b0a/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h b/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
index 7226205..519dd49 100644
--- a/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
+++ b/CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
@@ -21,7 +21,12 @@
 
 @protocol CDVScreenOrientationDelegate <NSObject>
 
-- (NSUInteger)supportedInterfaceOrientations;
+#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
+- (NSUInteger)supportedInterfaceOrientations;  
+#else  
+- (UIInterfaceOrientationMask)supportedInterfaceOrientations;
+#endif
+
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
 - (BOOL)shouldAutorotate;
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/69e06b0a/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 4019c20..f3a763b 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -419,7 +419,13 @@
     return YES;
 }
 
-- (NSUInteger)supportedInterfaceOrientations
+// CB-12098
+#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
+- (NSUInteger)supportedInterfaceOrientations  
+#else  
+- (UIInterfaceOrientationMask)supportedInterfaceOrientations
+#endif
+
 {
     NSUInteger ret = 0;
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/69e06b0a/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m b/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m
index 7dfe48f..4f5d2a7 100644
--- a/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m
+++ b/bin/templates/project/__PROJECT_NAME__/Classes/MainViewController.m
@@ -92,7 +92,13 @@
     return[super newCordovaViewWithFrame:bounds];
 }
 
-- (NSUInteger)supportedInterfaceOrientations 
+// CB-12098
+#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
+- (NSUInteger)supportedInterfaceOrientations
+#else  
+- (UIInterfaceOrientationMask)supportedInterfaceOrientations
+#endif
+
 {
     return [super supportedInterfaceOrientations];
 }


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