Suge Suge - 1 year ago 45
iOS Question

Why is only one UIEvent created for many separate touches?

I'm learning the touch event mechanism of iOS.

From the documentation I understood that a

object would be created when first touch down happened, it would live till the last touch up, and it would contain all the
objects created in the period.

But in my testing, I found that there is only one
object created in a view in whole life of the application, and the number of
objects it contains depends on how many fingers touch.

If you touch with one finger, there would be only one
object created, and the
object would be updated in different phases.

I mean the representation in my testing is different from the description of the documentation: there is only one
object when many different touches happen.

Why is that? Have I misunderstood something anywhere?


An event is an action or occurrence detected by the program that may be handled by the program. The event could be anything like touch event, motion event or remote-control event. Simply UITouch also is an part of UIEvent. UITouch can generate event which is handled by program. Program sense the touch using event.

For more detail information you get in following links,

I hope it will helpful.