mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-18 06:31:05 +00:00
Drag and drop
The drag and drop is now enabled only if touching with one finger. The tap to drop does not fire another timer
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
UITouch *touch = [[event allTouches] anyObject];
|
UITouch *touch = [[event allTouches] anyObject];
|
||||||
touchLocation = [touch locationInView:self];
|
touchLocation = [touch locationInView:self];
|
||||||
touchMoved = false;
|
touchMoved = false;
|
||||||
|
if ([[event allTouches] count] == 1 && !isDragging) {
|
||||||
dragTimer = [NSTimer scheduledTimerWithTimeInterval:2.0
|
dragTimer = [NSTimer scheduledTimerWithTimeInterval:2.0
|
||||||
target:self
|
target:self
|
||||||
selector:@selector(onDragStart:)
|
selector:@selector(onDragStart:)
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
repeats:NO];
|
repeats:NO];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)onDragStart:(NSTimer*)timer {
|
- (void)onDragStart:(NSTimer*)timer {
|
||||||
if (!touchMoved && !isDragging){
|
if (!touchMoved && !isDragging){
|
||||||
|
|||||||
Reference in New Issue
Block a user