Skip to content

Fix attributedText messageLabelFont bug#412

Merged
SD10 merged 2 commits intodevelopmentfrom
bugfix/attributed-font
Dec 18, 2017
Merged

Fix attributedText messageLabelFont bug#412
SD10 merged 2 commits intodevelopmentfrom
bugfix/attributed-font

Conversation

@SD10
Copy link
Copy Markdown
Member

@SD10 SD10 commented Dec 18, 2017

This resolves a bug when sending a new message using .attributedText(NSAttributedString).

This is caused by MessagesCollectionView calling the TextMessageCell's method configure(with:at:and) which sets the attributedText for MessageLabel.

However, afterwards apply(_ layoutAttributes: UICollectionViewLayoutAttributes) is called which then results in overwriting the .font in the attributedText by settings messageLabel.font to MessageCollectionViewLayoutAttributes.messageLabelFont.

Therefore, my solution is to extract the font inside of the MessagesCollectionViewFlowLayout object.

@SD10 SD10 merged commit 95199c9 into development Dec 18, 2017
@SD10 SD10 deleted the bugfix/attributed-font branch December 18, 2017 03:30
@SD10 SD10 mentioned this pull request Dec 18, 2017
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant