Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
4a0ebf28
Commit
4a0ebf28
authored
Nov 13, 2013
by
Felix Paul Kühne
Browse files
Revert "Playback: remove unrecognized tap gesture"
This reverts commit
26a8d4c9
.
parent
88fc21cf
Changes
1
Show whitespace changes
Inline
Side-by-side
AspenProject/VLCMovieViewController.m
View file @
4a0ebf28
...
...
@@ -49,9 +49,11 @@
BOOL
_swipeGesturesEnabled
;
NSString
*
panType
;
UIView
*
_rootView
;
UIView
*
_splashView
;
UIPanGestureRecognizer
*
_panRecognizer
;
UISwipeGestureRecognizer
*
_swipeRecognizerLeft
;
UISwipeGestureRecognizer
*
_swipeRecognizerRight
;
UITapGestureRecognizer
*
_tapRecognizer
;
}
@property
(
nonatomic
,
strong
)
UIPopoverController
*
masterPopoverController
;
...
...
@@ -69,6 +71,10 @@
-
(
void
)
dealloc
{
if
(
_splashView
)
[
_splashView
removeFromSuperview
];
if
(
_tapRecognizer
)
[
_rootView
removeGestureRecognizer
:
_tapRecognizer
];
if
(
_swipeRecognizerLeft
)
[
_rootView
removeGestureRecognizer
:
_swipeRecognizerLeft
];
if
(
_swipeRecognizerRight
)
...
...
@@ -190,6 +196,8 @@
_swipeGesturesEnabled
=
YES
;
if
(
_swipeGesturesEnabled
)
{
_tapRecognizer
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapRecognized
)];
[
_tapRecognizer
setNumberOfTouchesRequired
:
2
];
_panRecognizer
=
[[
UIPanGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
panRecognized
:
)];
[
_panRecognizer
setMinimumNumberOfTouches
:
1
];
[
_panRecognizer
setMaximumNumberOfTouches
:
1
];
...
...
@@ -204,12 +212,14 @@
[
_rootView
addGestureRecognizer
:
_swipeRecognizerLeft
];
[
_rootView
addGestureRecognizer
:
_swipeRecognizerRight
];
[
_rootView
addGestureRecognizer
:
_panRecognizer
];
[
_rootView
addGestureRecognizer
:
_tapRecognizer
];
[
_panRecognizer
requireGestureRecognizerToFail
:
_swipeRecognizerLeft
];
[
_panRecognizer
requireGestureRecognizerToFail
:
_swipeRecognizerRight
];
_panRecognizer
.
delegate
=
self
;
_swipeRecognizerRight
.
delegate
=
self
;
_swipeRecognizerLeft
.
delegate
=
self
;
_tapRecognizer
.
delegate
=
self
;
}
_aspectRatios
=
@[
@"DEFAULT"
,
@"FILL_TO_SCREEN"
,
@"4:3"
,
@"16:9"
,
@"16:10"
,
@"2.21:1"
];
...
...
@@ -858,6 +868,21 @@
#pragma mark - multi-touch gestures
-
(
void
)
tapRecognized
{
if
([
_mediaPlayer
isPlaying
])
{
[
_mediaPlayer
pause
];
[
self
.
statusLabel
showStatusMessage
:
@" ▌▌"
];
}
else
{
[
_mediaPlayer
play
];
[
self
.
statusLabel
showStatusMessage
:
@" ►"
];
}
[
_rootView
addSubview
:
_splashView
];
[
UIView
animateWithDuration
:
1
animations:
^
{
_splashView
.
alpha
=
0
.
0
f
;}
completion:
^
(
BOOL
finished
){
[
_splashView
removeFromSuperview
];
}];
}
-
(
NSString
*
)
detectPanTypeForPan
:(
UIPanGestureRecognizer
*
)
panRecognizer
{
NSString
*
type
;
...
...
@@ -950,6 +975,7 @@
}
if
(
swipeRecognizer
.
state
==
UIGestureRecognizerStateEnded
)
{
[
_rootView
addSubview
:
_splashView
];
if
([
_mediaPlayer
isPlaying
])
[
_mediaPlayer
play
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment