소스 검색

Prevent from rotation to PortraitUpsideDown on iOS5.0, cosmetics

Gleb Pinigin 12 년 전
부모
커밋
011c4bc902
1개의 변경된 파일3개의 추가작업 그리고 15개의 파일을 삭제
  1. 3 15
      AspenProject/VLCPlaylistViewController.m

+ 3 - 15
AspenProject/VLCPlaylistViewController.m

@@ -256,29 +256,17 @@
 /* deprecated in iOS 6 */
 - (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 */
 - (NSUInteger)supportedInterfaceOrientations {
-    if (_foundMedia.count > 0)
-        return UIInterfaceOrientationMaskAll;
-    else
-        return UIInterfaceOrientationMaskPortrait;
+    return (_foundMedia.count > 0)? UIInterfaceOrientationMaskAll: UIInterfaceOrientationMaskPortrait;
 }
 
 /* introduced in iOS 6 */
 - (BOOL)shouldAutorotate {
-    if (_foundMedia.count > 0)
-        return YES;
-    else
-        return NO;
+    return (_foundMedia.count > 0);
 }
 
 #pragma mark - coin coin