akaru
akaru

Reputation: 6317

MPMoviePlayerViewController - how to intercept or change the function of the Done button

I'm using an MPMoviePlayerViewController. I have a UINavigationController, but instead of pushing it I call presentModalViewController. This is because I want the MPMoviePlayerViewController to have a cross dissolve transition (and I can set the modalTransitionStyle to that). It appears correctly, and fades into place. However, when it finishes, it causes the previous view to slide up into place. This is not what I want. I've tried setting the modalTransitionStyle and modalPresentationStyle to no effect.

I've also subclassed the MPMoviePlayerViewController but couldn't figure out how to intercept its default functionality of dismissing itself when finished playing or when the Done button is pressed. Perhaps if I could do that I could fix the above problem.

Upvotes: 4

Views: 1762

Answers (1)

Till
Till

Reputation: 27597

I would suggest you to hook in notification handlers for MPMoviePlayerDidFinishNotification and MPMoviePlayerWillExitFullScreenNotification. The former is invoked once the playback is finished / done / stopped. The latter is sent once the user taps on the DONE button from the MPMoviePlayerController's fullscreen interface.

Upvotes: 3

Related Questions