Skip to content

Commit c397b97

Browse files
guangyaoguangyao
authored andcommitted
优化红包字体
1 parent 6f68bfd commit c397b97

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ios/RCTAuroraIMUI/IMUIMessageCollectionView/Views/IMUIRedPacketMessageCell.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class IMUIRedPacketMessageCell: IMUIBaseMessageCell {
2121
backgroundImg.image = UIImage.init(named: "redPacket")
2222
backgroundImg.contentMode = UIViewContentMode.scaleToFill
2323
contentLable.textColor = UIColor.white
24-
contentLable.font = UIFont.systemFont(ofSize: (screenW * 16 / 375))
24+
contentLable.font = UIFont.systemFont(ofSize: (screenW * 15 / 375))
2525
tipsLabel.textColor = UIColor.white
2626
tipsLabel.font = UIFont.systemFont(ofSize: (screenW * 12 / 375))
2727
tipsLabel.text = "领取红包"
@@ -58,10 +58,11 @@ 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 contentY = (contentH - 2*tmpSize.height - 5)*0.5
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
6263
contentLable.frame = CGRect(origin: CGPoint(x: contentX, y: contentY), size: CGSize(width: contentW, height: tmpSize.height))
63-
let tipsY = contentY + tmpSize.height + 5
64-
tipsLabel.frame = CGRect(origin: CGPoint(x: contentX, y: tipsY), size: CGSize(width: contentW, height: tmpSize.height))
64+
let tipsY = contentY + tipsSize.height + 5
65+
tipsLabel.frame = CGRect(origin: CGPoint(x: contentX, y: tipsY), size: CGSize(width: contentW, height: tipsSize.height))
6566
let titleX = layout.bubbleFrame.size.width * 0.067
6667
let titleW = layout.bubbleFrame.size.width * 0.143
6768
self.titleLable.frame = CGRect(origin: CGPoint(x: CGFloat(titleX), y: contentH), size: CGSize(width: titleW, height: titleLableH))

0 commit comments

Comments
 (0)