I'm building a chat view for my app with MessageKit. Image messages are something that this chat view will support. I'm currently having an issue where if the last message is a picture message, the message won't be properly displayed:
I'm loading all my messages in viewDidLoad
, and then updating the MessagesCollectionView
in viewWillAppear
:
override func viewWillAppear(_ animated: Bool) {
messagesCollectionView.reloadData()
messagesCollectionView.scrollToLastItem()
}
How do I get image messages to be properly displayed?