Commit 0948628c authored by Tobias's avatar Tobias

fix dismiss of player view controller when pressing menu button to cancel scrubbing:

disable simultaneous recognition of menu press recognizer of our VC and the one of the presentation controller by explicitly only allowing simultaneous recognition for the pan an siri remote recognizer
parent bf3dc376
......@@ -41,6 +41,8 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
@property (nonatomic, readonly, getter=isSeekable) BOOL seekable;
@property (nonatomic) NSSet<UIGestureRecognizer *> *simultaneousGestureRecognizers;
@end
@implementation VLCFullscreenMovieTVViewController
......@@ -77,11 +79,13 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
self.bufferingLabel.text = NSLocalizedString(@"PLEASE_WAIT", nil);
// Panning and Swiping
NSMutableSet<UIGestureRecognizer *> *simultaneousGestureRecognizers = [NSMutableSet set];
// Panning and Swiping
UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGesture:)];
panGestureRecognizer.delegate = self;
[self.view addGestureRecognizer:panGestureRecognizer];
[simultaneousGestureRecognizers addObject:panGestureRecognizer];
// Button presses
UITapGestureRecognizer *playpauseGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(playPausePressed)];
......@@ -110,6 +114,9 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
VLCSiriRemoteGestureRecognizer *siriArrowRecognizer = [[VLCSiriRemoteGestureRecognizer alloc] initWithTarget:self action:@selector(handleSiriRemote:)];
siriArrowRecognizer.delegate = self;
[self.view addGestureRecognizer:siriArrowRecognizer];
[simultaneousGestureRecognizers addObject:siriArrowRecognizer];
self.simultaneousGestureRecognizers = simultaneousGestureRecognizers;
self.audioView.hidden = YES;
self.audioArtworkImageView.animateImageSetting = YES;
......@@ -774,7 +781,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
return YES;
return [self.simultaneousGestureRecognizers containsObject:gestureRecognizer];
}
#pragma mark - meta data recipient
......
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