MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / tap

Function tap

packages/nativescript-inspector/src/index.ts:2374–2388  ·  view source on GitHub ↗
(target: any)

Source from the content-addressed store, hash-verified

2372}
2373
2374function tap(target: any): void {
2375 if (isKindOf(target, "UISwitch")) {
2376 target.setOnAnimated(!Boolean(read(target, "on")), true);
2377 sendActions(target, controlEventValueChanged);
2378 return;
2379 }
2380 if (isKindOf(target, "UIControl")) {
2381 sendActions(target, controlEventPrimaryActionTriggered);
2382 sendActions(target, controlEventTouchUpInside);
2383 return;
2384 }
2385 if (!call(target, "accessibilityActivate")) {
2386 call(target, "becomeFirstResponder");
2387 }
2388}
2389
2390function setText(target: any, value: string): void {
2391 if (!(isKindOf(target, "UITextField") || isKindOf(target, "UITextView"))) {

Callers 1

performMethod · 0.85

Calls 4

isKindOfFunction · 0.85
readFunction · 0.85
sendActionsFunction · 0.85
callFunction · 0.85

Tested by

no test coverage detected