用UIWebview加载的网页视频,如何能够获取操作done 按钮的事件呢???

这是一个用UIWebview加载的网页视频,然后在iPhone 上面播放以后就会出现iphone 的导航,我想得到done的点击事件怎么能得到呢?
clipboard.png

阅读 3.9k
1 个回答

首先你要添加一个通知
[notificationCenter addObserver:self selector:@selector(mediaPlayerPlaybackFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:self.moviePlayer];

/**

  • 播放完成
    *

  • @param notification 通知对象
    */

-(void)mediaPlayerPlaybackFinished:(NSNotification *)notification{

NSLog(@"播放完成.%li",(long)self.moviePlayer.playbackState);

// 你的操作

}

推荐问题