如何向iPhone OS发送触摸事件?

时间:2009-11-17 03:45:48

标签: iphone uitouch

我在越狱iphone上编写了一个在后台运行的应用程序。我需要向iPhone OS发送触摸事件以模拟手指触摸。这可能吗?

2 个答案:

答案 0 :(得分:2)

见Matt Gallagher的文章"Synthesizing a touch event on the iPhone"。您还可以查看Three20 framework,我相信使用合成触摸事件来测试UI元素(由于使用了私有API,导致最近application rejections的一连串冲突。)

答案 1 :(得分:0)

是的,可以使用GSEvents。试试KennyTM的私有框架和GSEvent.h。它在GraphicServices框架下。 https://github.com/kennytm/iphone-private-frameworks