mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-20 23:42:50 +08:00
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:
@ -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++;
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user