Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
8e871cbb
Commit
8e871cbb
authored
Mar 12, 2015
by
Kevin Chromik
Committed by
Felix Paul Kühne
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swipe up or down to go to previous or next item in playlist
Signed-off-by:
Felix Paul Kühne
<
fkuehne@videolan.org
>
parent
ccbf4da7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
Sources/VLCMovieViewController.m
Sources/VLCMovieViewController.m
+25
-0
No files found.
Sources/VLCMovieViewController.m
View file @
8e871cbb
...
...
@@ -80,6 +80,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
UIPanGestureRecognizer
*
_panRecognizer
;
UISwipeGestureRecognizer
*
_swipeRecognizerLeft
;
UISwipeGestureRecognizer
*
_swipeRecognizerRight
;
UISwipeGestureRecognizer
*
_swipeRecognizerUp
;
UISwipeGestureRecognizer
*
_swipeRecognizerDown
;
UITapGestureRecognizer
*
_tapRecognizer
;
UITapGestureRecognizer
*
_tapOnVideoRecognizer
;
...
...
@@ -119,6 +121,10 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
[
self
.
view
removeGestureRecognizer
:
_swipeRecognizerLeft
];
if
(
_swipeRecognizerRight
)
[
self
.
view
removeGestureRecognizer
:
_swipeRecognizerRight
];
if
(
_swipeRecognizerUp
)
[
self
.
view
removeGestureRecognizer
:
_swipeRecognizerUp
];
if
(
_swipeRecognizerDown
)
[
self
.
view
removeGestureRecognizer
:
_swipeRecognizerDown
];
if
(
_panRecognizer
)
[
self
.
view
removeGestureRecognizer
:
_panRecognizer
];
if
(
_pinchRecognizer
)
...
...
@@ -128,6 +134,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
_tapRecognizer
=
nil
;
_swipeRecognizerLeft
=
nil
;
_swipeRecognizerRight
=
nil
;
_swipeRecognizerUp
=
nil
;
_swipeRecognizerDown
=
nil
;
_panRecognizer
=
nil
;
_pinchRecognizer
=
nil
;
_tapOnVideoRecognizer
=
nil
;
...
...
@@ -295,17 +303,29 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
_swipeRecognizerLeft
.
direction
=
UISwipeGestureRecognizerDirectionLeft
;
_swipeRecognizerRight
=
[[
UISwipeGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
swipeRecognized
:
)];
_swipeRecognizerRight
.
direction
=
UISwipeGestureRecognizerDirectionRight
;
_swipeRecognizerUp
=
[[
UISwipeGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
swipeRecognized
:
)];
_swipeRecognizerUp
.
direction
=
UISwipeGestureRecognizerDirectionUp
;
_swipeRecognizerUp
.
numberOfTouchesRequired
=
2
;
_swipeRecognizerDown
=
[[
UISwipeGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
swipeRecognized
:
)];
_swipeRecognizerDown
.
direction
=
UISwipeGestureRecognizerDirectionDown
;
_swipeRecognizerDown
.
numberOfTouchesRequired
=
2
;
[
self
.
view
addGestureRecognizer
:
_swipeRecognizerLeft
];
[
self
.
view
addGestureRecognizer
:
_swipeRecognizerRight
];
[
self
.
view
addGestureRecognizer
:
_swipeRecognizerUp
];
[
self
.
view
addGestureRecognizer
:
_swipeRecognizerDown
];
[
self
.
view
addGestureRecognizer
:
_panRecognizer
];
[
self
.
view
addGestureRecognizer
:
_tapRecognizer
];
[
_panRecognizer
requireGestureRecognizerToFail
:
_swipeRecognizerLeft
];
[
_panRecognizer
requireGestureRecognizerToFail
:
_swipeRecognizerRight
];
[
_panRecognizer
requireGestureRecognizerToFail
:
_swipeRecognizerUp
];
[
_panRecognizer
requireGestureRecognizerToFail
:
_swipeRecognizerDown
];
_panRecognizer
.
delegate
=
self
;
_swipeRecognizerRight
.
delegate
=
self
;
_swipeRecognizerLeft
.
delegate
=
self
;
_swipeRecognizerUp
.
delegate
=
self
;
_swipeRecognizerDown
.
delegate
=
self
;
_tapRecognizer
.
delegate
=
self
;
_aspectRatios
=
@[
@"DEFAULT"
,
@"FILL_TO_SCREEN"
,
@"4:3"
,
@"16:9"
,
@"16:10"
,
@"2.21:1"
];
...
...
@@ -1747,6 +1767,11 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
else
if
(
swipeRecognizer
.
direction
==
UISwipeGestureRecognizerDirectionLeft
)
{
[
_mediaPlayer
jumpBackward
:
swipeDuration
];
hudString
=
[
NSString
stringWithFormat
:
@"⇐ %is"
,
swipeDuration
];
}
else
if
(
swipeRecognizer
.
direction
==
UISwipeGestureRecognizerDirectionUp
)
{
[
self
backward
:
self
];
}
else
if
(
swipeRecognizer
.
direction
==
UISwipeGestureRecognizerDirectionDown
)
{
[
self
forward
:
self
];
}
if
(
swipeRecognizer
.
state
==
UIGestureRecognizerStateEnded
)
{
...
...
Write
Preview
Markdown
is supported
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