私のアプリケーションはムービーで始まり、スワイプダウンまたはスライドしてムービーを続行しようとしていますが、なぜジェスチャーが機能しないのか分かりません。MPMoviePlayerViewControllerのスワイプ・ダウン・ジェスチャー
[player view].userInteractionEnabled = NO;
-(void) swiped: (UISwipeGestureRecognizer *) sender {
NSLog(@"SLIDE DOWN");
NSString *path = [[NSBundle mainBundle] pathForResource:@"sahar3" ofType:@"mov"];
player = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:path]];
player.moviePlayer.scalingMode = MPMovieScalingModeFill;
player.moviePlayer.controlStyle = MPMovieControlStyleNone;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedPlaying:)
name:MPMoviePlayerPlaybackDidFinishNotification object:[player moviePlayer]];
player.moviePlayer.repeatMode = NO;
[self.view addSubview:player.view];
}
- (void)viewDidLoad
{
NSLog(@"lunched");
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swiped:)];
swipe.direction = UISwipeGestureRecognizerDirectionDown;
}
どんな答えを適用する上でアウトレットを追加するのを忘れ思う: - ?sの –