Is there a way to fake a real touch into iPhone OS?
I need to fake a real touch event programmatically, so that any subsequent touch (from the users finger, for example) will immediately result into a -touchesMoved.... message rather than -touchesBegan....
Any solution how to do that? I know Three20, but I need somet开发者_运维技巧hing legal.
I'm not sure if I got you right, but if you want touchesBegan act like touchesMoved why don't do like:
- (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
}
}
Is it not viable to simply set a flag to interpret the next touchesBegan event as a touchesMoved event instead, and have your own code handle figuring out what the latter event would look like?
精彩评论