请查看Matt Gallagher在 "Synthesizing a touch event on the iPhone" 的文章。您还可以查看Three20框架,我认为它使用合成的触摸事件来测试UI元素(导致最近应用程序被拒绝,因为使用了私有API)。
是的,使用GSEvents是可能的。尝试使用KennyTM的私有框架和GSEvent.h。它位于GraphicServices框架下。 https://github.com/kennytm/iphone-private-frameworks