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
+3
View File
@@ -8,6 +8,9 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa
### Fixed
- Fixed message rendering when `MessagesViewController` sliding back.
[#454](https://github.com/MessageKit/MessageKit/pull/454) by [@zhongwuzw](https://github.com/zhongwuzw).
- Fixed `iPhoneX` `MessageInputBar` transparent bottom area when `keyboardDismissMode` is `interactive`.
[#425](https://github.com/MessageKit/MessageKit/pull/425) by [@zhongwuzw](https://github.com/zhongwuzw).
+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) {