Created
July 22, 2015 10:33
-
-
Save 0xced/c51946173412d17927f3 to your computer and use it in GitHub Desktop.
Reverse engineered implementation of -[MPMoviePlayerViewController _moviePlayerViewController_playbackDidFinishNotification:]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation MPMoviePlayerViewController | |
- (void) _moviePlayerViewController_playbackDidFinishNotification:(NSNotification *)notification | |
{ | |
if (self.presentingViewController.presentedViewController == self) | |
{ | |
UIViewController *presentingViewController = self.presentingViewController; | |
if (self->_internal->_wasDisplayedAnimated) | |
[presentingViewController dismissMoviePlayerViewControllerAnimated]; | |
else | |
[presentingViewController dismissViewControllerAnimated:NO completion:nil]; | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Astute readers will notice that if
MPMoviePlayerViewController
is used as a child view controller,self.presentingViewController.presentedViewController == self
will not be true and the movie player view controller will never be dismissed.