Browse Source

Prevent from rotation to PortraitUpsideDown on iOS5.0, cosmetics

Gleb Pinigin 12 years ago
parent
commit
011c4bc902
1 changed files with 3 additions and 15 deletions
  1. 3 15
      AspenProject/VLCPlaylistViewController.m

+ 3 - 15
AspenProject/VLCPlaylistViewController.m

@@ -256,29 +256,17 @@
 /* deprecated in iOS 6 */
 /* deprecated in iOS 6 */
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
 {
 {
-    if (UIInterfaceOrientationIsPortrait(toInterfaceOrientation))
-        return YES;
-
-    if (_foundMedia.count > 0)
-        return YES;
-    else
-        return NO;
+    return (toInterfaceOrientation == UIInterfaceOrientationPortrait) || (_foundMedia.count > 0);
 }
 }
 
 
 /* introduced in iOS 6 */
 /* introduced in iOS 6 */
 - (NSUInteger)supportedInterfaceOrientations {
 - (NSUInteger)supportedInterfaceOrientations {
-    if (_foundMedia.count > 0)
-        return UIInterfaceOrientationMaskAll;
-    else
-        return UIInterfaceOrientationMaskPortrait;
+    return (_foundMedia.count > 0)? UIInterfaceOrientationMaskAll: UIInterfaceOrientationMaskPortrait;
 }
 }
 
 
 /* introduced in iOS 6 */
 /* introduced in iOS 6 */
 - (BOOL)shouldAutorotate {
 - (BOOL)shouldAutorotate {
-    if (_foundMedia.count > 0)
-        return YES;
-    else
-        return NO;
+    return (_foundMedia.count > 0);
 }
 }
 
 
 #pragma mark - coin coin
 #pragma mark - coin coin