I solved the problem.
Method -willEnterBackground should look like:
- (void)willEnterBackground { if (player) { playbackTime = player.moviePlayer.currentPlaybackTime; [self dismissModalViewControllerAnimated:NO]; }}
We have to dismiss MPMoviePlayerViewController manually when app is entering background mode.Pay attention to use only
[self dismissModalViewControllerAnimated:NO];
instead of
[self dismissMoviePlayerViewControllerAnimated];
Thats because MPMoviePlayerViewController was shown with
[self presentModalViewController:player animated:YES];