Want to generate touch events dynamically with code on Swift4

Asked 2 years ago, Updated 2 years ago, 33 views

On iOS, when the hardware detects a touch on the screen, the UIGestureRecognizer event is called, but without this actual physical touch, is it possible to send an event that pretends to be a touch on the code?

swift ios

2022-09-30 14:51

1 Answers

This API is likely to be available for inheritance classes in the UIControl class.
https://developer.apple.com/documentation/uikit/uicontrol/1618237-sendaction


2022-09-30 14:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.