Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有点问题想咨询下 #2

Open
hot-man opened this issue Jul 6, 2017 · 5 comments
Open

有点问题想咨询下 #2

hot-man opened this issue Jul 6, 2017 · 5 comments

Comments

@hot-man
Copy link

hot-man commented Jul 6, 2017

我直接_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
Copy link
Author

hot-man commented Jul 6, 2017

不需要添加点击事件吗

@hiXgb
Copy link
Owner

hiXgb commented Jul 6, 2017

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

@hot-man
Copy link
Author

hot-man commented Jul 6, 2017

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

@hot-man
Copy link
Author

hot-man commented Jul 6, 2017

应该是跟tableview的手势冲突了

@hot-man
Copy link
Author

hot-man commented Jul 6, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants