Is there a way to invoke TouchesBegan, TouchesMoved, TouchedEnded programmatically ??
Is there a way to invoke TouchesBegan, TouchesMoved, TouchedEnded programmatically ??
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you can’t. Unfortunately,
UIEventdoesn’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.