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
26a8d4c9
Commit
26a8d4c9
authored
Oct 26, 2013
by
Felix Paul Kühne
Browse files
Playback: remove unrecognized tap gesture
parent
a8db4e53
Changes
1
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCMovieViewController.m
View file @
26a8d4c9
...
...
@@ -49,11 +49,9 @@
BOOL
_swipeGesturesEnabled
;
NSString
*
panType
;
UIView
*
_rootView
;
UIView
*
_splashView
;
UIPanGestureRecognizer
*
_panRecognizer
;
UISwipeGestureRecognizer
*
_swipeRecognizerLeft
;
UISwipeGestureRecognizer
*
_swipeRecognizerRight
;
UITapGestureRecognizer
*
_tapRecognizer
;
}
@property
(
nonatomic
,
strong
)
UIPopoverController
*
masterPopoverController
;
...
...
@@ -71,10 +69,6 @@
-
(
void
)
dealloc
{
if
(
_splashView
)
[
_splashView
removeFromSuperview
];
if
(
_tapRecognizer
)
[
_rootView
removeGestureRecognizer
:
_tapRecognizer
];
if
(
_swipeRecognizerLeft
)
[
_rootView
removeGestureRecognizer
:
_swipeRecognizerLeft
];
if
(
_swipeRecognizerRight
)
...
...
@@ -196,8 +190,6 @@
_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
];
...
...
@@ -212,14 +204,12 @@
[
_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"
];
...
...
@@ -885,21 +875,6 @@
return
CGSizeMake
(
screenWidth
,
screenHeight
);
}
-
(
void
)
tapRecognized
{
if
([
_mediaPlayer
isPlaying
])
{
[
_mediaPlayer
pause
];
[
self
_displayHUDwithText
:
@" ▌▌"
];
}
else
{
[
_mediaPlayer
play
];
[
self
_displayHUDwithText
:
@" ►"
];
}
[
_rootView
addSubview
:
_splashView
];
[
UIView
animateWithDuration
:
1
animations:
^
{
_splashView
.
alpha
=
0
.
0
f
;}
completion:
^
(
BOOL
finished
){
[
_splashView
removeFromSuperview
];
}];
}
-
(
NSString
*
)
detectPanTypeForPan
:(
UIPanGestureRecognizer
*
)
panRecognizer
{
NSString
*
type
;
...
...
@@ -1003,7 +978,6 @@
}
if
(
swipeRecognizer
.
state
==
UIGestureRecognizerStateEnded
)
{
[
_rootView
addSubview
:
_splashView
];
if
([
_mediaPlayer
isPlaying
])
[
_mediaPlayer
play
];
...
...
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