Reputation: 183
I'd like to make appear an image during specific period when keep touching on regarding uitableviewcell (like snapchat).
I'm trying to implement touchesBegan method but doesn't work. It will be great if anyone give me an advice & idea about how can I implement or which object should I use.
Upvotes: 2
Views: 271
Reputation: 156
When you touch the a cell, it becomes highlighted; try overriding setHighlighted:
in a subclass of UITableViewCell to adjust your appearance when it changes to YES (user touching) or NO (user lifted off).
(Overriding touchesBegan:withEvent:
will also work, but it's easier to use setHighlighted:
in order to capture when you're not longer touching; otherwise you need to override touchesEnded:withEvent:
and touchesCancelled:withEvent:
).
Upvotes: 2