mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-15 07:45:55 +10:00
adjust nameLabel in ChatLeftAudioCell
This commit is contained in:
@@ -191,17 +191,22 @@ class ChatLeftAudioCell: ChatBaseCell {
|
||||
}
|
||||
|
||||
audioContainerView.sendSubviewToBack(bubbleImageView)
|
||||
configNameLabel(topOffset)
|
||||
|
||||
configNameLabel()
|
||||
|
||||
playing = false
|
||||
}
|
||||
|
||||
func configNameLabel(topOffset: CGFloat) {
|
||||
|
||||
func configNameLabel() {
|
||||
|
||||
if inGroup {
|
||||
nameLabel.text = user?.nickname
|
||||
nameLabel.sizeToFit()
|
||||
nameLabel.frame = CGRect(x: CGRectGetMaxX(avatarImageView.frame) + YepConfig.chatCellGapBetweenTextContentLabelAndAvatar(), y: audioContainerView.frame.origin.y - topOffset, width: nameLabel.frame.width, height: nameLabel.frame.height)
|
||||
// bubbleTailImageView.hidden = true
|
||||
//nameLabel.sizeToFit()
|
||||
let height = YepConfig.ChatCell.nameLabelHeightForGroup
|
||||
let x = CGRectGetMaxX(avatarImageView.frame) + YepConfig.chatCellGapBetweenTextContentLabelAndAvatar()
|
||||
let y = audioContainerView.frame.origin.y - height
|
||||
let width = contentView.bounds.width - x - 10
|
||||
nameLabel.frame = CGRect(x: x, y: y, width: width, height: height)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user