ソースを参照

[*] 气泡整体调整

yanxuyao 9 ヶ月 前
コミット
f828ea83b4

+ 5 - 5
MiMoLive/MiMoLive/Classes/Live/MOShowLiveVC.m

@@ -3860,18 +3860,18 @@ static int mainRTMJoinNum = 0;
     //vip提示
     if(entity.user.vip.type == 0){
         MORtmEntity *vipTipEntity = [MORtmEntity prepareRtmTextMessageWithType:SystemTipVip AndText:NSLocalString(@"mimo_room_chat_tip_vip") And:NO AndRoomId:self.liveModel.currentRoom.id];
-        vipTipEntity.cellHeight = MOTextLabelMinHeight;
+        vipTipEntity.cellHeight = MOTextLabelMinHeight + MONormalBlueFixSpacing;
         [self toAddRtmMsgWith:vipTipEntity];
     }
     
     //聊天提示
     MORtmEntity *chatTipEntity = [MORtmEntity prepareRtmTextMessageWithType:SystemTipChat AndText:NSLocalString(@"mimo_room_chat_tip_chat") And:NO AndRoomId:self.liveModel.currentRoom.id];
-    chatTipEntity.cellHeight = MOTextLabelMinHeight;
+    chatTipEntity.cellHeight = MOTextLabelMinHeight + MONormalBlueFixSpacing;
     [self toAddRtmMsgWith:chatTipEntity];
     
     //礼物提示
     MORtmEntity *giftTipEntity = [MORtmEntity prepareRtmTextMessageWithType:SystemTipGift AndText:NSLocalString(@"mimo_room_chat_tip_gift") And:NO AndRoomId:self.liveModel.currentRoom.id];
-    giftTipEntity.cellHeight = MOTextLabelMinHeight;
+    giftTipEntity.cellHeight = MOTextLabelMinHeight + MONormalBlueFixSpacing;
     [self toAddRtmMsgWith:giftTipEntity];
     
     CGSize size = [MOTextTools textMessageCellSizeWith:entity];
@@ -3946,7 +3946,7 @@ static int mainRTMJoinNum = 0;
     //系统提示
     MORtmEntity *sysTipEntity = [MORtmEntity prepareRtmTextMessageWithType:SystemTipMsg AndText:NSLocalString(@"mimo_room_chat_notice") And:NO AndRoomId:self.liveModel.currentRoom.id];
     CGSize tipSize = [MOTextTools textMessageCellSizeWithString:NSLocalString(@"mimo_room_chat_notice")];
-    sysTipEntity.cellHeight = MAX(tipSize.height + 1.0, MOTextLabelMinHeight);
+    sysTipEntity.cellHeight = MAX(tipSize.height + 1.0, MOTextLabelMinHeight) + MONormalBlueFixSpacing;
     [self toAddRtmMsgWith:sysTipEntity];
 }
 
@@ -3954,7 +3954,7 @@ static int mainRTMJoinNum = 0;
     //通用蓝色提示
     MORtmEntity *sysTipEntity = [MORtmEntity prepareRtmTextMessageWithType:SystemTipNormalBlue AndText:contentStr And:NO AndRoomId:self.liveModel.currentRoom.id];
     CGSize tipSize = [MOTextTools textMessageCellSizeWithString:contentStr];
-    sysTipEntity.cellHeight = MAX(tipSize.height + 1.0, MOTextLabelMinHeight);
+    sysTipEntity.cellHeight = MAX(tipSize.height + 1.0, MOTextLabelMinHeight) + MONormalBlueFixSpacing;
     sysTipEntity.contentWidth = [MOTextTools getWidthWith:sysTipEntity];
     [self toAddRtmMsgWith:sysTipEntity];
 }

+ 1 - 1
MiMoLive/MiMoLive/Classes/Live/View/LiveingView/MOShowRoomLiveView.m

@@ -1415,7 +1415,7 @@ static int theLikeComboNum = 0;
     //通用蓝色提示
     MORtmEntity *sysTipEntity = [MORtmEntity prepareRtmTextMessageWithType:SystemTipNormalBlue AndText:contentStr And:NO AndRoomId:self.roomInfo.id];
     CGSize tipSize = [MOTextTools textMessageCellSizeWithString:contentStr];
-    sysTipEntity.cellHeight = MAX(tipSize.height + 1.0, MOTextLabelMinHeight);
+    sysTipEntity.cellHeight = MAX(tipSize.height + 1.0, MOTextLabelMinHeight) + MONormalBlueFixSpacing;
     sysTipEntity.contentWidth = [MOTextTools getWidthWith:sysTipEntity];
     [self toAddRtmMsgWith:sysTipEntity];
 }

+ 2 - 0
MiMoLive/MiMoLive/Classes/Live/View/MsgShowView/MOLiveMsgBaseCell.h

@@ -23,6 +23,8 @@
 #define MOContentBaseTopSpcing  4.0
 #define MOContentBaseBottomSpcing  3.0
 
+#define MONormalBlueFixSpacing 4.0
+
 #define MONormalBgViewColor [MOTools colorWithHexString:@"#000000" alpha:0.2]
 #define MORtmCellMixHeight 28.0 //Rtm最小高度
 #define MORtmContentMixHeight 20.0 //Rtm最小高度

+ 3 - 3
MiMoLive/MiMoLive/Classes/Live/View/MsgShowView/MOLiveMsgNormalTipCell.m

@@ -43,7 +43,7 @@
     [self.iconImgView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.width.height.equalTo(@16.0);
         make.centerY.equalTo(self.bgView);
-        make.left.equalTo(self.bgView).offset(5.0);
+        make.left.equalTo(self.bgView).offset(MOContentBaseLeftSpacing);
     }];
     
     [self.bgView addSubview:self.rightImgView];
@@ -51,7 +51,7 @@
         make.width.equalTo(@6.0);
         make.height.equalTo(@9.0);
         make.centerY.equalTo(self.bgView);
-        make.right.equalTo(self.bgView).offset(-5.0);
+        make.right.equalTo(self.bgView).offset(-MOContentBaseLeftSpacing);
     }];
     
     [self.bgView addSubview:self.contentLab];
@@ -83,7 +83,7 @@
     CGFloat cellWidth = (SCREENWIDTH - MOLiveMsgLeftSpacing - MOLiveMsgRightSpacing - MOBgViewOffSet * 2);
     
     CGFloat contentLabWidth = [MOTools getWidthWithString:jsonEntity.content font:MOTextLabelFont];
-    CGFloat rightSpacing = cellWidth - contentLabWidth - 5.0 - 16.0 - 5.0 - 5.0 - 6.0;
+    CGFloat rightSpacing = cellWidth - contentLabWidth - MOContentBaseLeftSpacing - 16.0 - 5.0 - MOContentBaseLeftSpacing - 6.0;
     
     if(cellModel.type == SystemTipVip){
         [self.iconImgView setImage:[UIImage imageNamed:@"icon_live_msg_vip"]];

+ 3 - 3
MiMoLive/MiMoLive/Classes/Live/View/MsgShowView/MOLiveMsgSystemTipCell.m

@@ -34,8 +34,8 @@
     
     [self.bgView addSubview:self.contentTextView];
     [self.contentTextView mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.equalTo(self.bgView).offset(5.0);
-        make.right.equalTo(self.bgView).offset(-5.0);
+        make.left.equalTo(self.bgView).offset(0.0);
+        make.right.equalTo(self.bgView).offset(0.0);
         make.centerY.equalTo(self.bgView);
         make.height.equalTo(@16.0);
     }];
@@ -87,7 +87,7 @@
     if(!_contentTextView){
         _contentTextView = [MOMsgContentTextView new];
         _contentTextView.backgroundColor = [UIColor clearColor];
-        _contentTextView.textContainerInset = UIEdgeInsetsMake(4, -5, 0, -5);//UITextView原本文字距离左右有间距,设置负数消除边距
+        _contentTextView.textContainerInset = UIEdgeInsetsMake(MOContentBaseTopSpcing, MOContentBaseLeftSpacing, MOContentBaseBottomSpcing, MOContentBaseRightSpacing);//UITextView原本文字距离左右有间距,设置负数消除边距
         _contentTextView.editable = NO;
         _contentTextView.scrollEnabled = NO;//防止滑出屏幕又滑入时有时单行文字消失
         _contentTextView.userInteractionEnabled = NO;

+ 1 - 1
MiMoLive/MiMoLive/Classes/Live/View/MsgShowView/MOLiveMsgTextCell.m

@@ -26,7 +26,7 @@
 - (void)setupUI{
     [self.contentView addSubview:self.titleLab];
     [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.top.equalTo(self.contentView).offset(0.0);
+        make.top.equalTo(self.contentView).offset(2.0);
         make.leading.trailing.equalTo(self.contentView);
         make.height.equalTo(@(MOTextTitleLabeHeight));
     }];