Skip to content

Commit

Permalink
Fixing orientation for Landscape removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tj Fallon committed May 23, 2019
1 parent ef7d11b commit 3149847
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -229,16 +229,15 @@ - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation

- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if ([[NSUserDefaults gameOrientation] isEqualToString:SKZ_LANDSCAPE_ORIENTATION]) {
return UIInterfaceOrientationMaskLandscape;
} else {
return UIInterfaceOrientationMaskPortrait;
}
// Need to return a conversation of preferredInterfaceOrientationForPresentation from our rootViewController or all.
// Trying all for now.
return UIInterfaceOrientationMaskAll;
}
#pragma mark - Autorotation (before iOS 6.0)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//Keeping this the same for the moment as it seems to work well.
if ([[NSUserDefaults gameOrientation] isEqualToString:SKZ_LANDSCAPE_ORIENTATION]) {
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
} else {
Expand Down

0 comments on commit 3149847

Please sign in to comment.