Merge branch 'development' of https://github.com/MessageKit/MessageKit into tagonsoft_development

# Conflicts:
#	Example/Podfile.lock
#	Example/Sources/View Controllers/ChatViewController.swift
#	MessageKit.xcodeproj/project.pbxproj
#	Sources/Protocols/MessageCellDelegate.swift
This commit is contained in:
Iosif Moldovan
2018-10-16 09:13:25 +03:00
18 changed files with 203 additions and 82 deletions
@@ -135,18 +135,7 @@ class ChatViewController: MessagesViewController, MessagesDataSource {
let lastIndexPath = IndexPath(item: 0, section: messageList.count - 1)
let frame = messagesCollectionView.layoutAttributesForItem(at: lastIndexPath)?.frame ?? .zero
var rect = messagesCollectionView.convert(frame, to: view)
// substract 100 to make the "visible" area of a cell bigger
rect.origin.y -= 100
var visibleRect = CGRect(x: messagesCollectionView.bounds.origin.x, y: messagesCollectionView.bounds.origin.y, width:
messagesCollectionView.bounds.size.width, height:
messagesCollectionView.bounds.size.height - messagesCollectionView.contentInset.bottom)
visibleRect = messagesCollectionView.convert(visibleRect, to: view)
return visibleRect.contains(rect)
return messagesCollectionView.indexPathsForVisibleItems.contains(lastIndexPath)
}
// MARK: - MessagesDataSource
@@ -244,6 +233,10 @@ extension ChatViewController: MessageCellDelegate {
print("Did stop audio sound")
}
func didTapAccessoryView(in cell: MessageCollectionViewCell) {
print("Accessory view tapped")
}
}
// MARK: - MessageLabelDelegate