I think you can use
-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
to start NSTimer, which will take the time for you
and
-(void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
to stop this timer and get how long the user is listening to the view, and then you can make an event in accordance with this time for a long press.
Hope this helps you.
saadnib
source share