模拟一个水龙头,是可能的?

我知道可以在屏幕上截取一个水龙头,但是我想知道是否可以在屏幕的一个点(用x和y坐标)模拟水龙头。 谢谢


UITouch *touch = [[UITouch alloc] initInView:view];
UIEvent *eventDown = [[UIEvent alloc] initWithTouch:touch];

[touch.view touchesBegan:[eventDown allTouches] withEvent:eventDown];

[touch setPhase:UITouchPhaseEnded];
UIEvent *eventUp = [[UIEvent alloc] initWithTouch:touch];

[touch.view touchesEnded:[eventUp allTouches] withEvent:eventUp];

[eventDown release];
[eventUp release];
[touch release];

从这里http://cocoawithlove.com/2008/10/synthesizing-touch-event-on-iphone.html

链接地址: http://www.djcxy.com/p/5191.html

上一篇: Simulate a tap, is possible?

下一篇: Lightweight code editor widget for Java that supports JavaScript