1、viewDidLoad中
//按住录音按钮添加长按手势
UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
[self.longPressBtn addGestureRecognizer:longPressGesture];
2、//长按录音
-(void)longPress:(UILongPressGestureRecognizer*)gusture{
if(gusture.state==UIGestureRecognizerStateBegan){
NSLog(@"startPress");
[self startRcd];
}else if(gusture.state==UIGestureRecognizerStateEnded){
[self stopRcd];
NSLog(@"endPress");
}
}