messagekit

Duplicate collectionView cells after reloadData with Firebase query

谁都会走 提交于 2021-02-13 17:29:31
问题 I have a Firebase snapshot listener that checks for new documents, adds them to an array (the collectionView datasource) and then reloads the collectionView. However, I'm getting duplicate cells in the collectionView. I currently have 3 objects in my Firebase Firestore collection but they get duplicated for a total of 9 cells. I even added a check for the index so reloadData only happens after it reaches the end of the array. Here's the relevant code: messageListener = query

MessageKit Swift didSelectURL doesn't work

感情迁移 提交于 2020-06-29 04:13:52
问题 I'm trying to open url from messages and i'm using 3.0.0-beta-swift5 version of MessageKit. I implemented the delegate methods. func detectorAttributes(for detector: DetectorType, and message: MessageType, at indexPath: IndexPath) -> [NSAttributedString.Key: Any] { switch detector { case .hashtag, .mention, .url: return [.foregroundColor: UIColor.blue] default: return MessageLabel.defaultAttributes } } func enabledDetectors(for message: MessageType, at indexPath: IndexPath, in

Why does the MessageKit (`JSQMessagesViewController` replacement) input field disappears when VC segues from-right?

只愿长相守 提交于 2020-01-02 10:15:23
问题 I am trying to integrate MessageKit ( JSQMessagesViewController replacement) into my project. From my didSelectRowAt of messages table I segue to my ConversationVC which subclasses MessagesViewController ( MessageKit requirement) func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { guard let conversationVC = storyboard?.instantiateViewController(withIdentifier: "ConversationVC") as? ConversationVC else { return } self.presentDetail(conversationVC) }//end func This

Why does the MessageKit (`JSQMessagesViewController` replacement) input field disappears when VC segues from-right?

我只是一个虾纸丫 提交于 2019-12-06 06:30:54
I am trying to integrate MessageKit ( JSQMessagesViewController replacement) into my project. From my didSelectRowAt of messages table I segue to my ConversationVC which subclasses MessagesViewController ( MessageKit requirement) func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { guard let conversationVC = storyboard?.instantiateViewController(withIdentifier: "ConversationVC") as? ConversationVC else { return } self.presentDetail(conversationVC) }//end func This segues perfectly fine using the following custom function to present a VC: func presentDetail(_

Swift MessageKit problems - running swift 4.2

无人久伴 提交于 2019-11-29 22:55:31
问题 I had just updated my code to swift 4.2 and fixed all the errors. Now I am trying to use 'MessageKit' to put a messenger into my app. Everything is updated yet I am having these problems... now it is saying for MessagesInputBarDelegate "Use of undeclared type 'MessagesInputBarDelegate'" and "Use of undeclared type 'MessageInputBar'" Also, "Argument Labels '(type:)' do not match any available overloads" and "Cannot convert value of type'_?' to expected argument type 'URL?" Use of undeclared