fix(button): ios let the gesture observer handles tap events

in some weird cases like i some UICollectionView layouts the UIControlEvents.TouchUpInside is failing
This commit is contained in:
Martin Guillon
2021-03-18 14:00:36 +01:00
parent 56a3f9bd3c
commit a2d06a9efe
19 changed files with 62 additions and 59 deletions

View File

@ -1,4 +1,5 @@
import { StackLayout, Label, Button, EventData } from '@nativescript/core';
import { tapEvent } from '@nativescript/core/ui/button';
export class MyControl extends StackLayout {
constructor() {
@ -9,7 +10,7 @@ export class MyControl extends StackLayout {
var lbl = new Label();
var btn = new Button();
btn.text = 'Tap me!';
btn.on(Button.tapEvent, (args: EventData) => {
btn.on(tapEvent, (args: EventData) => {
lbl.text = 'Tap ' + counter++;
});