views:

41

answers:

1

Hi,

I have an UITableView and I want to detect double touches on UITableViewCell.

I wanted to create a method, that will be called from the main app cycle and will process touches. (i.e. keep in memory time of 2 last touches and if the time is less than 0.5 of a second than it is a double touch)

Is there a better way to achieve this?

+2  A: 

UITouch already handles timing double-touches for you; it's in the -tapCount of the UITouch object. Look at Event Delivery for some generic code for managing it.

Rob Napier