问题
is there a way to remove the fullscreen button from MPMoviePlayerController? Or at least deactivate it?
Yes I searched, but the older question isn't solved and I don't know if there is something like a "push" feature.
回答1:
There is no way to do that. You can hide the entire control panel. Hopefully this link helps.
回答2:
Actually there is no way to achieve this.
You can use either:
[yourPlayer setMovieControlMode:MPMovieControlModeNone];
(But it'll hide all controls)
or
Disable the user interaction using:
yourPlayer.view.userInteractionEnabled = NO;
(But no controls can be used)
回答3:
Try this one it worked for me
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieEventFullscreenHandler:)
name:MPMoviePlayerWillEnterFullscreenNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieEventFullscreenHandler:)
name:MPMoviePlayerDidEnterFullscreenNotification
object:nil];
self.moviePlayer.controlStyle = MPMovieControlStyleEmbedded;
}
- (void)movieEventFullscreenHandler:(NSNotification*)notification {
[self.moviePlayer setFullscreen:NO animated:NO];
[self.moviePlayer setControlStyle:MPMovieControlStyleEmbedded];
}
来源:https://stackoverflow.com/questions/16786652/removing-deactivating-fullscreen-button-on-movieplayercontrol