Skip to content
New issue

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

Forward collectionView(_:contextMenuConfigurationForItemAt:point:) to one of the delegates #176

Open
FaizanDurrani opened this issue Jan 11, 2025 · 1 comment

Comments

@FaizanDurrani
Copy link

FaizanDurrani commented Jan 11, 2025

Right now there's no way to add context menus to the items in the collection view, (see #176 (comment)) forwarding this UICollectionViewDelegate method to the scrollDelegate (or layoutDelegate? or even a new type of delegate) would allow consumers to set up context menus.

That being said, a more well rounded API would be to hook it up to the declarative syntax of items, similar to how didSelect works. Doing so, context menu configuration can be tied to the item in the section rather than being imperatively defined using itemPath(for:) in the delegate method.

@FaizanDurrani
Copy link
Author

A correction to the original issue: There is a way to add context menus to the items by directly adding a UIContextMenuInteraction to the view, and then hooking up the configuration as a Behavior.

A more "Epoxy"-like API would be great though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant