danielsaidi / Sheeeeeeeeet

Sheeeeeeeeet is a Swift library for creating menus, custom action sheets, context menus etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CollectionItem with single selection mode

undeaDD opened this issue · comments

I somehow need "itemSelectionAction:" to fire for every Item,
( or there needs to be a new parameter that has the rest of the Items in it )
so that i can call "cell.configureWith(item: )" on all of them ^^

photo_2020-10-06 09 47 52

Any ideas or alternative solutions ?


Quick second Question :P

Is there a simple way to dismiss the menu / actionSheet from inside "itemSelectionAction:"
Traversing, finding and dismissing the ActionSheet from UIWindow seems like a major hassle XF

just solved the second question myself :D ...
i just saved a ref to the ActionSheet and then called "sheet.presenter.dismiss{ ... }" from "itemSelectionAction:"

the first question is still open kinda ... by closing the ActionSheet i prevent multiple selection ... works for now but i hope to change that sometime soon :S

screenshot

Wow, looks great!

The demo has a collection view, but I'm not sure if it uses it to the full extent. We have pretty complex collection items at work, so I know that it works well.

You can have a look at the demo app's CollectionMenu, which has a selectionAction that triggers when the user selects a cell in the collection view. I think you should be able to do the same, but with your specific logic.