Skip to content

Commit 2425041

Browse files
guangyaoguangyao
authored andcommitted
Fix
1 parent d3ef723 commit 2425041

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUINotificationMessageCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class IMUINotificationMessageCell: IMUIBaseMessageCell {
1717
override init(frame: CGRect) {
1818
super.init(frame: frame)
1919
titleLable.textColor = UIColor.white
20-
titleLable.font = UIFont.systemFont(ofSize: (screenW * 13 / 375))
20+
titleLable.font = UIFont.systemFont(ofSize: 12)
2121
titleLable.textAlignment = NSTextAlignment.center
2222
titleLable.backgroundColor = UIColor.init(red: 206/255.0, green: 206/255.0, blue: 206/255.0, alpha: 1)
2323
titleLable.layer.cornerRadius = 5
@@ -39,7 +39,7 @@ class IMUINotificationMessageCell: IMUIBaseMessageCell {
3939
let tmpDict = message.customDict
4040
let strTitle = tmpDict.object(forKey: "tipMsg") as! String
4141
self.titleLable.text = strTitle
42-
let titleSize = sizeWithFont(font: UIFont.systemFont(ofSize: (screenW * 13 / 375)), text: strTitle, maxWidth: layout.bubbleFrame.size.width*0.8)
42+
let titleSize = sizeWithFont(font: UIFont.systemFont(ofSize: 12), text: strTitle, maxWidth: layout.bubbleFrame.size.width*0.8)
4343
let titleX = (layout.bubbleFrame.size.width - titleSize.width - 10) * 0.5
4444
let titleY = (layout.bubbleFrame.size.height - titleSize.height - 10) * 0.3
4545
self.titleLable.frame = CGRect(origin: CGPoint(x:titleX, y:titleY), size: CGSize(width:titleSize.width+10, height:titleSize.height+10))

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUIRedPacketMessageCell.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ class IMUIRedPacketMessageCell: IMUIBaseMessageCell {
2323
contentLable.textColor = UIColor.white
2424
contentLable.font = UIFont.systemFont(ofSize: (screenW * 15 / 375))
2525
tipsLabel.textColor = UIColor.white
26-
tipsLabel.font = UIFont.systemFont(ofSize: (screenW * 12 / 375))
26+
tipsLabel.font = UIFont.systemFont(ofSize: (screenW * 13 / 375))
2727
tipsLabel.text = "领取红包"
2828
titleLable.textColor = UIColor.gray
29-
titleLable.font = UIFont.systemFont(ofSize: (screenW * 12 / 375))
29+
titleLable.font = UIFont.systemFont(ofSize: (screenW * 13 / 375))
3030
titleLable.text = "红包"
3131
titleLable.textAlignment = NSTextAlignment.center
3232

@@ -58,10 +58,10 @@ class IMUIRedPacketMessageCell: IMUIBaseMessageCell {
5858
let contentH = layout.bubbleFrame.size.height * 0.74
5959
let titleLableH = layout.bubbleFrame.size.height * 0.26
6060
let tmpSize = self.heightWithFont(font: UIFont.systemFont(ofSize: (screenW * 16 / 375)), fixedWidth: contentW, text: "恭喜发财")
61-
let tipsSize = self.heightWithFont(font: UIFont.systemFont(ofSize: (screenW * 12 / 375)), fixedWidth: contentW, text: "领取红包")
62-
let contentY = (contentH - tmpSize.height - tipsSize.height - 5)*0.5
61+
let tipsSize = self.heightWithFont(font: UIFont.systemFont(ofSize: (screenW * 13 / 375)), fixedWidth: contentW, text: "领取红包")
62+
let contentY = (contentH - tmpSize.height - tipsSize.height - 3)*0.5
6363
contentLable.frame = CGRect(origin: CGPoint(x: contentX, y: contentY), size: CGSize(width: contentW, height: tmpSize.height))
64-
let tipsY = contentY + tipsSize.height + 5
64+
let tipsY = contentY + tmpSize.height + 3
6565
tipsLabel.frame = CGRect(origin: CGPoint(x: contentX, y: tipsY), size: CGSize(width: contentW, height: tipsSize.height))
6666
let titleX = layout.bubbleFrame.size.width * 0.067
6767
let titleW = layout.bubbleFrame.size.width * 0.143

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUIRedPacketOpenMessageCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class IMUIRedPacketOpenMessageCell: IMUIBaseMessageCell {
2828
override init(frame: CGRect) {
2929
super.init(frame: frame)
3030
titleLable.textColor = UIColor.white
31-
titleLable.font = UIFont.systemFont(ofSize: (screenW * 13 / 375))
31+
titleLable.font = UIFont.systemFont(ofSize: (screenW * 14 / 375))
3232
titleLable.textAlignment = NSTextAlignment.center
3333
self.redGesture.addTarget(self, action: #selector(self.clickTapRedView))
3434
tapRedView.isUserInteractionEnabled = true
@@ -74,7 +74,7 @@ class IMUIRedPacketOpenMessageCell: IMUIBaseMessageCell {
7474
}
7575

7676
self.titleLable.attributedText = attString
77-
let titleW = widthWithFont(font: UIFont.systemFont(ofSize: (screenW * 13 / 375)), text: strTitle, maxWidth: layout.bubbleFrame.size.width*0.9)
77+
let titleW = widthWithFont(font: UIFont.systemFont(ofSize: (screenW * 14 / 375)), text: strTitle, maxWidth: layout.bubbleFrame.size.width*0.9)
7878
let contentX = (layout.bubbleFrame.size.width - titleW - 20)*0.5
7979
let contentY = (layout.bubbleFrame.size.height - 24)*0.4
8080
redImg.frame = CGRect(origin: CGPoint(x:6, y:3), size: CGSize(width:14, height:18))

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUITextMessageCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ open class IMUITextMessageCell: IMUIBaseMessageCell {
5959
tmpContentInset.right = message.isOutGoing ? 5 : 0
6060
self.textMessageLable.textAlignment = CTTextAlignment.center
6161
}
62-
tmpContentInset.top = 8
62+
tmpContentInset.top = 6
6363
tmpContentInset.bottom = 0
6464
self.textMessageLable.frame = UIEdgeInsetsInsetRect(CGRect(origin: CGPoint.zero, size: layout.bubbleFrame.size), tmpContentInset)
6565
self.layoutToText(with: message.text(), isOutGoing: message.isOutGoing)

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUITransferMessageCell.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class IMUITransferMessageCell: IMUIBaseMessageCell {
2323
contentLable.textColor = UIColor.white
2424
contentLable.font = UIFont.systemFont(ofSize: (screenW * 16 / 375))
2525
amountLabel.textColor = UIColor.white
26-
amountLabel.font = UIFont.systemFont(ofSize: (screenW * 15 / 375))
26+
amountLabel.font = UIFont.systemFont(ofSize: (screenW * 13 / 375))
2727
titleLable.textColor = UIColor.gray
28-
titleLable.font = UIFont.systemFont(ofSize: (screenW * 15 / 375))
28+
titleLable.font = UIFont.systemFont(ofSize: (screenW * 13 / 375))
2929
titleLable.text = "转账"
3030

3131
bubbleView.addSubview(backgroundImg)
@@ -64,9 +64,10 @@ class IMUITransferMessageCell: IMUIBaseMessageCell {
6464
let contentH = layout.bubbleFrame.size.height * 0.74
6565
let titleLableH = layout.bubbleFrame.size.height * 0.26
6666
let tmpSize = self.heightWithFont(font: UIFont.systemFont(ofSize: 16), fixedWidth: contentW, text: "飞马转账")
67-
let contentY = (contentH - 2*tmpSize.height - 5)*0.5
67+
let amountSize = self.heightWithFont(font: UIFont.systemFont(ofSize: (screenW * 13 / 375)), fixedWidth: contentW, text: "转账")
68+
let contentY = (contentH - tmpSize.height - amountSize.height )*0.5
6869
contentLable.frame = CGRect(origin: CGPoint(x: contentX, y: contentY), size: CGSize(width: contentW, height: tmpSize.height))
69-
let tipsY = contentY + tmpSize.height + 5
70+
let tipsY = contentY + tmpSize.height
7071
amountLabel.frame = CGRect(origin: CGPoint(x: contentX, y: tipsY), size: CGSize(width: contentW, height: tmpSize.height))
7172
let titleX = layout.bubbleFrame.size.width * 0.067
7273
let titleW = layout.bubbleFrame.size.width * 0.143

ios/RCTAuroraIMUI/RCTMessageListView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ - (instancetype)initWithFrame:(CGRect)frame {
5555
- (id)initWithCoder:(NSCoder *)aDecoder {
5656
self = [super initWithCoder:aDecoder];
5757
if (self) {
58-
self.frame = CGRectMake(0, 0, screenW, screenH-60-50);//60为导航栏高度,50为输入栏默认高度
58+
// self.frame = CGRectMake(0, 0, screenW, screenH-60-50);//60为导航栏高度,50为输入栏默认高度
5959
[[NSNotificationCenter defaultCenter] addObserver:self
6060
selector:@selector(appendMessages:)
6161
name:kAppendMessages object:nil];

0 commit comments

Comments
 (0)