Minor edits

This commit is contained in:
Nathan Tannar
2018-09-25 23:04:15 -07:00
parent 041a239713
commit 406f700109
2 changed files with 4 additions and 2 deletions
@@ -317,6 +317,9 @@ extension AdvancedExampleViewController: MessagesDisplayDelegate {
}
func configureAccessoryView(_ accessoryView: UIView, for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) {
// Cells are reused, so only add a button here once. For real use you would need to
// ensure any subviews are removed if not needed
guard accessoryView.subviews.isEmpty else { return }
let button = UIButton(type: .infoLight)
button.tintColor = .primaryColor
accessoryView.addSubview(button)