Commit 8c318853 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Playback View: add pinch gesture to leave media playback

parent cd277787
......@@ -111,6 +111,10 @@
_displayRemainingTime = [[[NSUserDefaults standardUserDefaults] objectForKey:kVLCShowRemainingTime] boolValue];
UIPinchGestureRecognizer *pinchRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinchGesture:)];
pinchRecognizer.delegate = self;
[self.view addGestureRecognizer:pinchRecognizer];
#if 0 // FIXME: trac #8742
UISwipeGestureRecognizer *leftSwipeRecognizer = [[VLCHorizontalSwipeGestureRecognizer alloc] initWithTarget:self action:nil];
leftSwipeRecognizer.direction = UISwipeGestureRecognizerDirectionLeft;
......@@ -402,6 +406,12 @@
#pragma mark - controls visibility
- (void)handlePinchGesture:(UIPinchGestureRecognizer *)recognizer
{
if (recognizer.velocity < 0.)
[self closePlayback:nil];
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if (touch.view != self.view)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment