iphone: Preserve view on top of mpMoviePlayerController

喜你入骨 提交于 2019-12-11 13:51:49

问题


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?


回答1:


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]



来源:https://stackoverflow.com/questions/5479427/iphone-preserve-view-on-top-of-mpmovieplayercontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!