2010-07-07 6 views

Répondre

11

J'ai trouvé cette documentation ici:

http://developer.apple.com/iphone/library/documentation/mediaplayer/reference/mpmovieplayerviewcontroller_class/Reference/Reference.html#//apple_ref/occ/instm/MPMoviePlayerViewController/shouldAutorotateToInterfaceOrientation:

Donc, fondamentalement, il vous suffit de créer votre propre sous-classe de MPMoviePlayerViewController et passer outre la shouldAutorotateToInterfaceOrientation: méthode, comme ceci:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 
{ 
    return UIInterfaceOrientationIsLandscape(toInterfaceOrientation); 
} 
+0

d'accord avec andrew j'ai fait la même chose – harshalb

+1

@andrew: j'utilise ta méthode aussi, mais parfois elle joue encore en mode portrait – QViet

Questions connexes