我想知道你们中是否有人遇到过类似的问题,当然碰巧找到了合适或不那么合适(但有效)的解决方案/解决方法。
我正在使用 MPMoviePlayerViewController 并尝试将 Swipe-Gesture Recognizers 添加到 MPMoviePlayerViewControllers 视图中。
moviePlayerViewController = [[MPMoviePlayerViewController alloc]initWithContentURL:[NSURL URLWithString:currentChannel.StreamURI]];
[moviePlayerViewController.moviePlayer setControlStyle:MPMovieControlStyleNone];
moviePlayerViewController.moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
moviePlayerViewController.moviePlayer.shouldAutoplay = YES;
[moviePlayerViewController.moviePlayer setScalingMode: MPMovieScalingModeAspectFit];UISwipeGestureRecognizer *swipeGestureRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(previousChannel)];
swipeGestureRight.direction = UISwipeGestureRecognizerDirectionRight;
[myMoviePlayerViewController.view addGestureRecognizer:swipeGestureRight];
[self.view addSubview:moviePlayerViewController.view];
无论如何,它“有点工作”但是当我通过在正在运行的电影播放器实例(无论是在模拟器中还是在设备上)上做手势来测试整个事情时,应用程序崩溃并且控制台状态
** -[CFRunLoopTimer invalidate]: message sent to deallocated instance 0xf074bb0
你们中有人对这个话题有想法吗?