我想知道你們中的任何人是否遇到過類似的問題,當然碰巧找到了正確的或不正確的(但工作中)的解決方案/解決方法。MPMoviePlayerViewController上的UIGestureRecognizer
我正在使用MPMoviePlayerViewController,我試圖將一個Swipe-Gesture識別器添加到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
沒有任何人對此主題有想法嗎?