Pracuję z MPMoviePlayerViewController
,Jak wyłączyć pełnym ekranie MPMoviePlayerViewController w iOS
MPMoviePlayerViewController *avPlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
// [movieView prepareToPlay];
[avPlayer.view setFrame: CGRectMake(0, 200, 320, 100)]; // player's frame must match parent's
[avPlayer shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight];
[avPlayer shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeLeft];
avPlayer.moviePlayer.scalingMode=MPMovieScalingModeAspectFit;
avPlayer.moviePlayer.useApplicationAudioSession=NO;
avPlayer.moviePlayer.controlStyle=MPMovieControlStyleEmbedded;
//avPlayer.moviePlayer.repeatMode=MPMovieRepeatModeOne;
avPlayer.moviePlayer.scalingMode=MPMovieScalingModeFill;
[self.view addSubview: avPlayer.view];
Funkcja ta działa poprawnie. Ale muszę wyłączyć pełny ekran dla MPMoviePlayerViewController
. Tak więc napisałem:
avPlayer.moviePlayer.fullscreen=NO;
Ale to nie działa.
Czy możesz dać mi sugestię.
To nie będzie prawidłowo funkcjonować. Spróbuj tego, użyj tego kodu, a następnie użyj gestu uszczypnięcia, aby skalować w górę lub w dół -> bam! – Till