Simulate touch on iphone

后端 未结 5 946
清酒与你
清酒与你 2020-12-05 01:29

Im trying to simulate a touch on as UIWebView, how can I programmatically fire a touch event at a certain location? (x and y coordinates) Just call touchesBegan?

Ide

5条回答
  •  醉梦人生
    2020-12-05 01:56

    It is possible. Exactly how you mentioned, using GSEvents and sending them to the purple named port of the aplication you are trying to control/simulate. Of course you need KennyTM's GSEvent.h to accomplish this. I've done this for iOS 4.3, just by changing some of the values that Kenny had (like kGSHandInfoTypeTouchDown), but now I'm trying to do it for iOS 5 and it's not working, till now.

    EDIT: It is now working for iOS 5.1.

提交回复
热议问题