有没有办法伪造真正的iPhone OS?

时间:2009-11-18 10:53:40

标签: iphone cocoa-touch

我需要以编程方式伪造一个真正的触摸事件,以便任何后续触摸(例如,来自用户手指)将立即导致-touchesMoved ....消息而不是-touchesBegan ....

任何解决方案如何做到这一点?我知道Three20,但我需要一些 legal

2 个答案:

答案 0 :(得分:0)

仅仅设置一个标志来解释下一个touchesBegan事件作为touchesMoved事件是不可行的,并且有自己的代码句柄来确定后一个事件的样子?

答案 1 :(得分:0)

我不确定我是否让你正确,但如果你想触摸开始就像touchesMoved那样为什么不这样做:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
{
   if(specialModeOn)//I don't know if you need this
   {
     [self touchesMoved:touches withEvent:event];
   }
   else
   {
     //whatever touchesBegan should do normally
   }
}   
相关问题