我收到以下错误消息...
由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[YTPlayerView playerView]:无法识别的选择器发送到实例 0x7fd77bd41f80”
这是我的代码..
- (void)applicationDidEnterBackground:(NSNotification *)notification
{
[_playerView performSelector:@selector(playerView) withObject:nil afterDelay:0.1];
}
- (IBAction)didTapPlayPause:(id)sender {
self.btnPlayPause.selected = !self.btnPlayPause.selected;
if (self.btnPlayPause.selected)
{
self.title=self.strngvideotitle;
self.playerView=[[YTPlayerView alloc]initWithFrame:CGRectMake(0,0,375,290)];
[self.playerView loadWithVideoId:self.strngvideoId];
[self.view addSubview:_playerView];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
}