Fix message layout issue when sliding back controller

This commit is contained in:
zhongwuzw
2018-01-11 11:12:24 +08:00
parent de52e9085e
commit ea9908e617
2 changed files with 4 additions and 5 deletions
+1 -5
View File
@@ -45,6 +45,7 @@ open class TextMessageCell: MessageCollectionViewCell {
if let attributes = layoutAttributes as? MessagesCollectionViewLayoutAttributes {
messageLabel.textInsets = attributes.messageLabelInsets
messageLabel.font = attributes.messageLabelFont
messageLabel.frame = messageContainerView.bounds
}
}
@@ -57,11 +58,6 @@ open class TextMessageCell: MessageCollectionViewCell {
open override func setupSubviews() {
super.setupSubviews()
messageContainerView.addSubview(messageLabel)
setupConstraints()
}
open func setupConstraints() {
messageLabel.fillSuperview()
}
open override func configure(with message: MessageType, at indexPath: IndexPath, and messagesCollectionView: MessagesCollectionView) {