Explorar el Código

Fix autorotation in player view controller on iOS5.x

Gleb Pinigin hace 12 años
padre
commit
c384b35eeb
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      AspenProject/VLCMovieViewController.m

+ 7 - 0
AspenProject/VLCMovieViewController.m

@@ -321,6 +321,13 @@
     self.mediaItem.lastPosition = @([_mediaPlayer position]);
 }
 
+#pragma mark - autorotation
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
+    return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
+           || toInterfaceOrientation != UIInterfaceOrientationMaskPortraitUpsideDown;
+}
+
 #pragma mark - External Display
 
 - (BOOL)hasExternalDisplay