Rak*_*att 1 iphone nsnotificationcenter ipad ios ios8
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeStarted:) name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeFinished:) name:@"UIMoviePlayerControllerDidExitFullscreenNotification" object:nil];
Run Code Online (Sandbox Code Playgroud)
UIMoviePlayerControllerDidExitFullscreenNotification NSNotification在iOs 8中不起作用
我也遇到了同样的问题,但最终结束了使用 UIWindowDidBecomeVisibleNotification和UIWindowDidBecomeHiddenNotification,对于嵌入式youtube视频(假设通过查看您的选择器方法名称)
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(enteredFullScreen:) name:UIWindowDidBecomeVisibleNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitedFullScreen:) name:UIWindowDidBecomeHiddenNotification object:nil];
Run Code Online (Sandbox Code Playgroud)
上面是一个补丁工作,(希望这有帮助)
| 归档时间: |
|
| 查看次数: |
999 次 |
| 最近记录: |