Alex1987
Alex1987

Reputation: 9457

iphone: Preserve view on top of mpMoviePlayerController

I have a mpMoviePlayerController, and I have subview on top of it. When the user taps the fullscreen button of the mpMoviePlayerController, the subview disappears, and only appears when I go back to the original size. Is there a way to keep the subview? Is there a way to get a reference of the "scaled" moviePlayer?

Upvotes: 1

Views: 1083

Answers (1)

Till
Till

Reputation: 27597

Quick Draft:

  • trap MPMoviePlayerWillEnterFullscreenNotification like this:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMoviePlayerDidEnterFullscreen:) name:MPMoviePlayerDidEnterFullscreenNotification object:nil];

  • within MPMoviePlayerDidEnterFullscreen, add that subview onto the current keyWindow like this:

[[[UIApplication sharedApplication] keyWindow] addSubview:mySpecialSubview]

Upvotes: 2

Related Questions