Since we're not using UITextView for the message label, the text is not selectable.
We should add support for copying the text of the MessageLabels.
I'm interested in this one.
Should I take it from the 0.8.0 branch?
Is there any particular reason we are not using UITextView?
What kind of UI do you have in mind? It would be cool maybe something fancy like Telegram and WhatsApp, but 铮縈essages shows a simple action sheet as the copy control 馃槀
Hey @etoledom, I'm working on trying to finish up v0.8.0 now so this is probably better for v0.9.0+
I know @Ganzolo expressed interest in this and may have started working on it.
We're not using UITextView because I was advised not to -- which is good enough for me :)
As for the UI, I'm thinking something like the old iMessage/JSQMVC style. Although, the greater flexibility we can provide the better 馃槂
Cool! Let鈥檚 hope @Ganzolo can tell us if he is in this 馃槄.
In JSQMVC, uitextview was being used. The main problem was that, when you use the UIMenuController, there was a conflict between the collection view's UIMenuController and textview's. When you want to allow data detectors, you need to set uitextview selectable. Once you set it as selectable, then it would allow data detectors, then there will be a conflict with the collection view's UIMenuController. Therefore, we couldn't have used data detectors in JSQMVC.
I think we can use the collection view's UIMenuController to copy the texts. These way we can easily copy both texts and media messages.
Awesome @hamzaozturk thanks for this clear explanation and the valuable insight 鉂わ笍
Yes, I started working on it, I am going to PR something very soon, within next couple of days.
Just sharing some progress here. I am using following set of requirements for implementing copy :
So far the only lines I had to deactivate to start working on this feature is Long press gesture on MessageLabel.swift @SD10 would tell if it's acceptable.
@Ganzolo Yes the long press gesture for MessageLabel should be used for this. Those sound like good requirements to me.
This is resolved by #422 in MessageKit 13.0
Most helpful comment
In JSQMVC, uitextview was being used. The main problem was that, when you use the UIMenuController, there was a conflict between the collection view's UIMenuController and textview's. When you want to allow data detectors, you need to set uitextview selectable. Once you set it as selectable, then it would allow data detectors, then there will be a conflict with the collection view's UIMenuController. Therefore, we couldn't have used data detectors in JSQMVC.
I think we can use the collection view's UIMenuController to copy the texts. These way we can easily copy both texts and media messages.