Hi there,
I have an app with old code and now trying to replace the MPMoviePlayerViewController with the new AVPlayerViewController.
Unfortunate, it seems the AVPlayerViewController does not want to be presented via crossdissolve. It always appears with the default transition style. Am I missing something (maybe order of usage)?
NSURL *fileURL = [NSURL fileURLWithPath:movieFile];
AVPlayerViewController *mp = [[AVPlayerViewController alloc] init];
mp.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieFinishedCallback:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:mp.player];
[[NSNotificationCenter defaultCenter] removeObserver:mp
name:AVPlayerItemDidPlayToEndTimeNotification
object:mp.player];
AVPlayer *player = [AVPlayer playerWithURL:fileURL];
mp.player = player;
[self presentViewController:mp animated:YES completion:nil];
[player play];