make double tap dragging easier to trigger on iPhone
This commit is contained in:
1 parent
ab503875cb
commit
c5fc72cc2c
2 files changed
+3
-3
No files matched your search
@@ -1214,11 +1214,11 @@ import UIKit
|
|||||||
if widget.capturedTouches.contains(touch) || !widget.isSlidable {continue}
|
if widget.capturedTouches.contains(touch) || !widget.isSlidable {continue}
|
||||||
widget.capturedTouches.add(touch)
|
widget.capturedTouches.add(touch)
|
||||||
widget.handleButtonDown()
|
widget.handleButtonDown()
|
||||||
print("UIButton: \(widget.buttonLabel) in, \(widget.touchPadString), \(CACurrentMediaTime())")
|
// print("UIButton: \(widget.buttonLabel) in, \(widget.touchPadString), \(CACurrentMediaTime())")
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if !widget.capturedTouches.contains(touch) || !widget.isSlidable {continue}
|
if !widget.capturedTouches.contains(touch) || !widget.isSlidable {continue}
|
||||||
print("UIButton: \(widget.buttonLabel) out test, \(widget.touchPadString), \(CACurrentMediaTime())")
|
// print("UIButton: \(widget.buttonLabel) out test, \(widget.touchPadString), \(CACurrentMediaTime())")
|
||||||
widget.capturedTouches.remove(touch)
|
widget.capturedTouches.remove(touch)
|
||||||
widget.handlebuttonUp()
|
widget.handlebuttonUp()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ static const float QUICK_TAP_TIME_INTERVAL = 0.2;
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
- (BOOL)isAdjacentTouches:(CGPoint)currentPoint from:(CGPoint)originalPoint {
|
- (BOOL)isAdjacentTouches:(CGPoint)currentPoint from:(CGPoint)originalPoint {
|
||||||
return hypotf(originalPoint.x - currentPoint.x, originalPoint.y - currentPoint.y) <= 100;
|
return hypotf(originalPoint.x - currentPoint.x, originalPoint.y - currentPoint.y) <= 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user