hiXgb / BBVoiceRecordDemo

WeChat like voice record view
50 stars 12 forks source link

有点问题想咨询下 #2

Open hot-man opened 7 years ago

hot-man commented 7 years ago

我直接_btnRecord = [BBHoldToSpeakButton buttonWithType:UIButtonTypeCustom]; _btnRecord.frame = CGRectMake(30, 300, 300, 49); _btnRecord.layer.borderWidth = 0.5; _btnRecord.layer.borderColor = LineColor.CGColor; _btnRecord.layer.cornerRadius = 4; _btnRecord.layer.masksToBounds = YES; _btnRecord.enabled = NO; //将事件往上传递 _btnRecord.titleLabel.font = [UIFont boldSystemFontOfSize:16]; _btnRecord.backgroundColor = Level5Color; [_btnRecord setTitleColor:Text3Color forState:UIControlStateNormal]; [_btnRecord setTitleColor:Text3Color forState:UIControlStateHighlighted]; [_btnRecord setTitle:@"按住 说话" forState: UIControlStateNormal]; [self.view addSubview: _btnRecord]; 怎么点击没啥反应

hot-man commented 7 years ago

不需要添加点击事件吗

hiXgb commented 7 years ago

你看我例子里,事件放在touchesBegan、touchesMoved、touchesEnded和touchesCancelled里处理了

hot-man commented 7 years ago

我这边不知道是不是被tableview的事件屏蔽了

hot-man commented 7 years ago

应该是跟tableview的手势冲突了

hot-man commented 7 years ago

弹出录音框的时候可以把tableview.userInteractionEnabled关闭就行 谢谢了