mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(iOS-gestures) touch delegate does not call base class touch methods (#6113)
* fix ios Touch gestures super methods not being called on nativeView * use “this.view”
This commit is contained in:
committed by
Alexander Vakrilov
parent
8100727043
commit
7ebac7c353
@@ -353,18 +353,22 @@ class TouchGestureRecognizer extends UIGestureRecognizer {
|
|||||||
|
|
||||||
touchesBeganWithEvent(touches: NSSet<any>, event: any): void {
|
touchesBeganWithEvent(touches: NSSet<any>, event: any): void {
|
||||||
this.executeCallback(TouchAction.down, touches, event);
|
this.executeCallback(TouchAction.down, touches, event);
|
||||||
|
this.view.touchesBeganWithEvent(touches, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
touchesMovedWithEvent(touches: NSSet<any>, event: any): void {
|
touchesMovedWithEvent(touches: NSSet<any>, event: any): void {
|
||||||
this.executeCallback(TouchAction.move, touches, event);
|
this.executeCallback(TouchAction.move, touches, event);
|
||||||
|
this.view.touchesMovedWithEvent(touches, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
touchesEndedWithEvent(touches: NSSet<any>, event: any): void {
|
touchesEndedWithEvent(touches: NSSet<any>, event: any): void {
|
||||||
this.executeCallback(TouchAction.up, touches, event);
|
this.executeCallback(TouchAction.up, touches, event);
|
||||||
|
this.view.touchesEndedWithEvent(touches, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
touchesCancelledWithEvent(touches: NSSet<any>, event: any): void {
|
touchesCancelledWithEvent(touches: NSSet<any>, event: any): void {
|
||||||
this.executeCallback(TouchAction.cancel, touches, event);
|
this.executeCallback(TouchAction.cancel, touches, event);
|
||||||
|
this.view.touchesCancelledWithEvent(touches, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
private executeCallback(action: string, touches: NSSet<any>, event: any): void {
|
private executeCallback(action: string, touches: NSSet<any>, event: any): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user