-(void)initGR{ UILongPressGestureRecognizer *longPressGR = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; longPressGR.minimumPressDuration = 0.7; [self addGestureRecognizer:longPressGR]; } -(void)handleLongPress:(UILongPressGestureRecognizer *)recognize{ }
原文:http://my.oschina.net/u/1781028/blog/406876