views:

36

answers:

1

Hi all,

Is there a way to get the touch duration of a UITableViewCell without subclassing? The reason being I want to display a modal view controller when the user holds a cell and display a detail view when the user taps a cell. I already have a working app using default UITableViewCells (but recently found a need for the hold event) which is the reason I dont really want to have to use subclassing. Any thoughts?

Many thanks

Jules

+2  A: 

If you can live with 3.2+ compatibility, you can add UIGestureRecognizer for different type of touches (long touch).

Eiko
Thanks for the help, I'm taking a look at the docs now and I'll let you know how it goes.
Jules
Thanks very much this worked perfectly. I simply added the relevant gestureRecognizer to my cell and that was it! Magic.
Jules