Skip to content

[WIP] Making copy feature using partial Collection view mechanism. Could no…#155

Closed
Ganzolo wants to merge 1 commit into
MessageKit:v0.9.0from
Ganzolo:copyPaste
Closed

[WIP] Making copy feature using partial Collection view mechanism. Could no…#155
Ganzolo wants to merge 1 commit into
MessageKit:v0.9.0from
Ganzolo:copyPaste

Conversation

@Ganzolo

@Ganzolo Ganzolo commented Sep 24, 2017

Copy link
Copy Markdown

…t rely entirely on Collection view MenuController has it does not support customisation of target frame.

…t rely entirely on Collection view MenuController has it does not support customisation of target frame.
@Ganzolo

Ganzolo commented Sep 24, 2017

Copy link
Copy Markdown
Author

After doing some researches, to implement this feature there seems to be 2 different ways :

  1. Implement it with a gesture on UICollectionViewCell's level
  2. Implement it from the controller using CollectionView's Menu controller (same as @hamzaozturk suggested)

First option give us more control in the way we display menu controller. Especially controlling its location. However it has a big drawback as the copy action would happen within cell subclass. Meaning that we need to have a reference to Collection View controller to grasp the data from Data source. I consider as inappropriate to just copy content of cell.

Second option occurs in UICollectionViewDelegate, which is a perfect place to have access to raw data. However it has a huge drawback, it seems that there is no support to adjust the position of the menu controller. Therefor it is just displayed above the whole cell. In our case we have bubbles and we would like to have menu controller centred above our bubbles.

After doing researches and experiment I found out a trick using Menu Controller's notifications to override the position. I don't see any other way of doing it. But maybe someone has a better proposal.

@SD10 SD10 mentioned this pull request Sep 26, 2017
24 tasks
@SD10

SD10 commented Sep 27, 2017

Copy link
Copy Markdown
Member

@Ganzolo Sorry for the delay. I hope to review this really soon! Thank you for taking the time to work on this 👍

@SD10 SD10 changed the title Making copy feature using partial Collection view mechanism. Could no… [WIP] Making copy feature using partial Collection view mechanism. Could no… Sep 30, 2017
@SD10

SD10 commented Oct 9, 2017

Copy link
Copy Markdown
Member

Closing in favor of #248

@SD10 SD10 closed this Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants