Use default supported rotations when none are specified

This commit is contained in:
Jonny Paton 2018-04-12 11:58:46 -07:00 committed by Lukas Dürrenberger
parent fd071fb4ab
commit 1b1ae8e48e
3 changed files with 1 additions and 17 deletions

View File

@ -173,7 +173,7 @@ namespace
NSArray *supportedOrientations = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UISupportedInterfaceOrientations"]; NSArray *supportedOrientations = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UISupportedInterfaceOrientations"];
if (!supportedOrientations) if (!supportedOrientations)
return false; return (1 << orientation) & [rootViewController supportedInterfaceOrientations];
int appFlags = 0; int appFlags = 0;
if ([supportedOrientations containsObject:@"UIInterfaceOrientationPortrait"]) if ([supportedOrientations containsObject:@"UIInterfaceOrientationPortrait"])

View File

@ -55,14 +55,6 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
- (BOOL)shouldAutorotate; - (BOOL)shouldAutorotate;
////////////////////////////////////////////////////////////
/// \brief Returns the supported orientations (iOS >= 6)
///
/// \return A combination of all the supported orientations
///
////////////////////////////////////////////////////////////
- (NSUInteger)supportedInterfaceOrientations;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member data // Member data
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -46,12 +46,4 @@
return self.orientationCanChange; return self.orientationCanChange;
} }
////////////////////////////////////////////////////////////
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
@end @end