我已将YouTube嵌入到我的应用程序中,现在我想要的是将播放器的全屏按钮绑定到iOS中的自定义方法,有没有办法实现这一目标?
答案 0 :(得分:0)
使用UIWindowDidBecomeHiddenNotification
和UIWindowDidBecomeVisibleNotification
通知。当全屏播放器打开时,它会隐藏应用程序的窗口。
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(videoExitFullScreen:)
name:UIWindowDidBecomeVisibleNotification
object:self.view.window];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(videoEnterFullScreen:)
name:UIWindowDidBecomeHiddenNotification
object:self.view.window];