Search code examples
xcodeiosmpmovieplayer

MPMoviePlayer resizing animation possible?


I can't seem to find an answer or I'm not searching correctly.

I would like to know if it is possible to manually resize the movieplayer and show it animating during the resize like it does when you select it to play fullscreen.

Thank you in advance for input!


Solution

  • IIRC, I have done so with MPMoviePlayerController. I do with AVPlayer in a released app. Of course, if you are doing fullscreen, you should use the fullscreen key, and otherwise use the following code. Here is how to make practically anything animate:

    [UIView animateWithDuration:0.5
                     animations:^{ myMovieView.frame = newFrame; }];