Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: remove deprecated orientation methods #822

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CordovaLib/Classes/Public/CDVAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDiction
return YES;
}

#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
#else //CB-12098. Defaults to UIInterfaceOrientationMask for iOS 9+
- (UIInterfaceOrientationMask)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
#endif
{
// iPhone doesn't support upside down by default, while the iPad does. Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected).
NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown);
Expand Down
5 changes: 0 additions & 5 deletions CordovaLib/Classes/Public/CDVScreenOrientationDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@

@protocol CDVScreenOrientationDelegate <NSObject>

#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)supportedInterfaceOrientations;
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations;
#endif

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
- (BOOL)shouldAutorotate;

@end
5 changes: 0 additions & 5 deletions CordovaLib/Classes/Public/CDVViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,7 @@ - (BOOL)shouldAutorotate
return YES;
}

// CB-12098
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)supportedInterfaceOrientations
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
#endif
{
NSUInteger ret = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,6 @@ - (void)viewDidLoad
// Do any additional setup after loading the view from its nib.
}

/* Comment out the block below to over-ride */

/*
// CB-12098
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)supportedInterfaceOrientations
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
#endif
{
return [super supportedInterfaceOrientations];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}

- (BOOL)shouldAutorotate
{
return [super shouldAutorotate];
}
*/

@end

@implementation MainCommandDelegate
Expand Down
5 changes: 0 additions & 5 deletions tests/CordovaLibTests/CordovaLibApp/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,4 @@ - (void)viewDidLoad
// Do any additional setup after loading the view, typically from a nib.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,6 @@ - (void)viewDidLoad
// Do any additional setup after loading the view from its nib.
}

/* Comment out the block below to over-ride */

/*
// CB-12098
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)supportedInterfaceOrientations
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
#endif
{
return [super supportedInterfaceOrientations];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}

- (BOOL)shouldAutorotate
{
return [super shouldAutorotate];
}
*/

@end

@implementation MainCommandDelegate
Expand Down