在我的应用程序中,我正在加载一些嵌入了照片和视频的网页。此外,我使用以下通知来管理播放器,
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(embeddedVideoStarted:) name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(embeddedVideoEnded:) name:@"UIMoviePlayerControllerWillExitFullscreenNotification" object:nil];
这在iOS7中运行良好,但在iOS8中无效。任何解决方法?提前谢谢。
答案 0 :(得分:4)
这是一个选项,我发现..问题是不会将DID隐藏起来..
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(embeddedVideoStarted:)
name:UIWindowDidBecomeVisibleNotification
object:self.view.window];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(embeddedVideoEnded:)
name:UIWindowDidBecomeHiddenNotification
object:self.view.window];
如果,我找到第二个通知的修复程序,我会发布它:..)