更换腾讯cos上传
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
|
||||
@interface QXRoomBottomView()<QXDynamicCommentInputViewDelegate>
|
||||
@property (nonatomic,strong)UIView *sayBg;
|
||||
@property (nonatomic,strong)UIImageView *sayImageView;
|
||||
@property (nonatomic,strong)UILabel *sayLabel;
|
||||
@property (nonatomic,strong)UIButton *emojiBtn;
|
||||
@property (nonatomic,strong)UIButton *chatBtn;
|
||||
|
||||
/// voice
|
||||
@property (nonatomic,strong)QXBadgeButton *playAudioBtn;
|
||||
@@ -52,14 +52,6 @@
|
||||
self.sayBg = [[UIView alloc] init];
|
||||
self.sayBg.backgroundColor = RGB16A(0xffffff, 0.2);
|
||||
[self.sayBg addRoundedCornersWithRadius:18];
|
||||
[self.sayBg addTapBlock:^(id _Nonnull obj) {
|
||||
if (weakSelf.roomModel.user_info.is_mute.intValue == 1) {
|
||||
showToast(@"您已被禁言");
|
||||
return;
|
||||
}
|
||||
[weakSelf.vc.view addSubview:weakSelf.commentView];
|
||||
[weakSelf.commentView.textField becomeFirstResponder];
|
||||
}];
|
||||
[self addSubview:self.sayBg];
|
||||
[self.sayBg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
@@ -68,22 +60,25 @@
|
||||
make.width.mas_equalTo(106);
|
||||
}];
|
||||
|
||||
self.sayImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_say_icon"]];
|
||||
[self.sayBg addSubview:self.sayImageView];
|
||||
[self.sayImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(10);
|
||||
make.centerY.equalTo(self.sayBg);
|
||||
make.width.height.mas_equalTo(24);
|
||||
self.emojiBtn = [[UIButton alloc] init];
|
||||
self.emojiBtn.tag = QXRoomBottomViewEventTypeEmoji;
|
||||
[self.emojiBtn addTarget:self action:@selector(eventAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.emojiBtn setImage:[UIImage imageNamed:@"room_emoji_btn"] forState:(UIControlStateNormal)];
|
||||
[self.sayBg addSubview:self.emojiBtn];
|
||||
[self.emojiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(0);
|
||||
make.top.bottom.equalTo(self.sayBg);
|
||||
make.width.equalTo(self.emojiBtn.mas_height);
|
||||
}];
|
||||
|
||||
self.sayLabel = [[UILabel alloc] init];
|
||||
self.sayLabel.textColor = [UIColor whiteColor];
|
||||
self.sayLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.sayLabel.text = QXText(@"说点什么");
|
||||
self.sayLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[self.sayBg addSubview:self.sayLabel];
|
||||
[self.sayLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.sayImageView.mas_right);
|
||||
self.chatBtn = [[UIButton alloc] init];
|
||||
[self.chatBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
||||
[self.chatBtn addTarget:self action:@selector(chatAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.chatBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.chatBtn setTitle:QXText(@"说点什么") forState:(UIControlStateNormal)];
|
||||
[self.sayBg addSubview:self.chatBtn];
|
||||
[self.chatBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.emojiBtn.mas_right);
|
||||
make.centerY.equalTo(self.sayBg);
|
||||
make.right.equalTo(self.sayBg);
|
||||
}];
|
||||
@@ -323,6 +318,15 @@
|
||||
-(void)setPlayAudioStatus:(BOOL)status{
|
||||
self.playAudioBtn.selected = status;
|
||||
}
|
||||
|
||||
-(void)chatAction{
|
||||
if (self.roomModel.user_info.is_mute.intValue == 1) {
|
||||
showToast(@"您已被禁言");
|
||||
return;
|
||||
}
|
||||
[self.vc.view addSubview:self.commentView];
|
||||
[self.commentView.textField becomeFirstResponder];
|
||||
}
|
||||
-(void)eventAction:(UIButton*)sender{
|
||||
|
||||
if (sender == self.audioBtn) {
|
||||
|
||||
Reference in New Issue
Block a user