Search code examples
iosmpmovieplayercontrollerdismissparentviewcontroller

iOS call void in parentViewController from MPMoviePlayerViewController when dismissed


How can I call a custom -(void) in the parentViewController of a MPMoviePlayerViewCotroller when is is dismissed?


Solution

  • Try to call it in the viewDidAppear of the parentViewController.

    Set a flag before showing the MPMoviePlayerViewController and check it in viewDidAppear. Then call your own method accordingly.

    Hope this helps.