Learn Courses My Dashboard

How to programmatically fake a touch event to a UIButton?

I want to simulate fake touch on the mobile screen, User can give coordinates and at the same exact point user can click without touch the screen,
You can see this video on
Please see attached video

https://drive.google.com/file/d/1ANZUtBzkE39UIb3WmvQxPhdv48VsZuXg/view?usp=sharing

This is the example url.
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwi6mtrpnpP6AhUJCewKHVvjCJsQrAIoAHoECBAQAQ&url=https%3A%2F%2Fdeveloper.apple.com%2Fforums%2Fthread%2F14124&usg=AOvVaw3CH0Bvib8vUkG9iKbgTO24

Hello @muzammil if you’re working with UIKit maybe this solution can help you.

But if you’re working with SwiftUI, unfortunately I don’t know how I can help, this is one of the areas that is still unfamiliar for me, personally.