I got a problem that it hasn't change to portrait mode when using the following code:
NSString *url = @"http://abc.com/movie.3gp"; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:url]]; moviePlayer.scalingMode = MPMovieScalingModeAspectFill; // seen nothing change when comment this line if([moviePlayer respondsToSelector:@selector(setOrientation:animated:)]) [moviePlayer setOrientation:UIDeviceOrientationPortrait animated:NO]; [moviePlayer play];
Is my code problem? anyone can solve my problem or any alternative?
Thanks.
Best Answer
is there any particular reason you expect this code to work?
MPMoviePlayerController
isn't documented as having asetOrientation
method...I don't think there's a way to make this happen.