adjust nameLabel in ChatLeftAudioCell

This commit is contained in:
nixzhu
2015-11-03 18:39:00 +08:00
parent 7977e50710
commit 7b64dc8535
@@ -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)
}
}
}