Commit 9af5072e authored by Soomin Lee's avatar Soomin Lee Committed by Carola Nitz

VLCMovieViewController: Fix iPhoneX crash upon interfaceLock

`_tapToSeekRecognizer` is not initialized when using an iPhoneX
which lead to a `NSInvalidArgumentException`
Signed-off-by: default avatarCarola Nitz <nitz.carola@googlemail.com>
parent 74844af3
......@@ -618,25 +618,29 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
- (NSArray *)itemsForInterfaceLock
{
return @[_pinchRecognizer,
_panRecognizer,
_tapToSeekRecognizer,
_tapRecognizer,
_doneButton,
_timeNavigationTitleView.minimizePlaybackButton,
_timeNavigationTitleView.positionSlider,
_timeNavigationTitleView.aspectRatioButton,
_controllerPanel.playbackSpeedButton,
_controllerPanel.trackSwitcherButton,
_controllerPanel.bwdButton,
_controllerPanel.playPauseButton,
_controllerPanel.fwdButton,
_controllerPanel.videoFilterButton,
_multiSelectionView.equalizerButton,
_multiSelectionView.chapterSelectorButton,
_multiSelectionView.repeatButton,
_multiSelectionView.shuffleButton,
_controllerPanel.volumeView];
NSMutableArray *items = [[NSMutableArray alloc] initWithArray: @[_pinchRecognizer,
_panRecognizer,
_tapRecognizer,
_doneButton,
_timeNavigationTitleView.minimizePlaybackButton,
_timeNavigationTitleView.positionSlider,
_timeNavigationTitleView.aspectRatioButton,
_controllerPanel.playbackSpeedButton,
_controllerPanel.trackSwitcherButton,
_controllerPanel.bwdButton,
_controllerPanel.playPauseButton,
_controllerPanel.fwdButton,
_controllerPanel.videoFilterButton,
_multiSelectionView.equalizerButton,
_multiSelectionView.chapterSelectorButton,
_multiSelectionView.repeatButton,
_multiSelectionView.shuffleButton,
_controllerPanel.volumeView]];
[[UIDevice currentDevice] isiPhoneX] ? [items addObject:_tapToToggleiPhoneXRatioRecognizer]
: [items addObject:_tapToSeekRecognizer];
return [items copy];
}
- (void)handlePinchGesture:(UIPinchGestureRecognizer *)recognizer
......
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