Is there a way to invoke TouchesBegan, TouchesMoved, TouchedEnded programmatically ??
views:
343answers:
2It's just a method so you could call it and create the events yourself I assume (assumptions are bad though). If you are trying to trigger your own touchesX code it would seem easier to just move that to its own method and call it straight away.
Exactly what are you trying to achieve?
No, you can't. Unfortunately, UIEvent
doesn't expose any public way to create events; only the internal dispatcher is allowed to do that. You can't cook up your own events from scratch and use them in a meaningful way.
Sounds like you might be able in your application to forward the events-- by taking them from the place where they land originally, and just sending them to the view that you want to consume them by calling those methods directly. Depending on what those views are, make sure you fully understand the event dispatch sequence (hit testing etc), though, so you don't confuse UIKit views.