We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I wanted to know if there's a delegate to detect on copy ? i wanted to debug to check why the image isn't copied
Thanks
The text was updated successfully, but these errors were encountered:
no, you must handle by your self
Sorry, something went wrong.
yes. there are three handler functions inside MessagesViewController
MessagesViewController
open func collectionView(_: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool { guard let messagesDataSource = messagesCollectionView.messagesDataSource else { return false } if isSectionReservedForTypingIndicator(indexPath.section) { return false } let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView) switch message.kind { case .text, .attributedText, .emoji, .photo: selectedIndexPathForMenu = indexPath return true default: return false } } open func collectionView( _: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender _: Any?) -> Bool { if isSectionReservedForTypingIndicator(indexPath.section) { return false } return (action == NSSelectorFromString("copy:")) } open func collectionView(_: UICollectionView, performAction _: Selector, forItemAt indexPath: IndexPath, withSender _: Any?) { guard let messagesDataSource = messagesCollectionView.messagesDataSource else { fatalError(MessageKitError.nilMessagesDataSource) } let pasteBoard = UIPasteboard.general let message = messagesDataSource.messageForItem(at: indexPath, in: messagesCollectionView) switch message.kind { case .text(let text), .emoji(let text): pasteBoard.string = text case .attributedText(let attributedText): pasteBoard.string = attributedText.string case .photo(let mediaItem): pasteBoard.image = mediaItem.image ?? mediaItem.placeholderImage default: break } }
No branches or pull requests
Hello, I wanted to know if there's a delegate to detect on copy ? i wanted to debug to check why the image isn't copied
Thanks
The text was updated successfully, but these errors were encountered: