How to access MPMoviePlayerController when MPMovieControlStyle = MPMovieControlStyleNone

In one of my applications, I do not want to show any video controllers. But I need to touch watching a media player. I need to do some other action when touching the player. How can I implement this. Please, help

Thanks in advance.

+4
source share
2 answers

You can always attach a UITapGestureRecognizer to the view and handle the taps.

 UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; [moviePlayer.view addGestureRecognizer:tap]; [tap release]; 

And handle the tap in handleTap:

 - (void)handleTap:(UITapGestureRecognizer *)gesture { // Do some other action as intended. } 

Of course, this only works on iOS 3.2 and later.

+5
source

You can also use this delegate method of UIGestureRecognizer.

 - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch; 
0
source

All Articles