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

Decouple MenuItem from ActionSheetItemCell

danielsaidi opened this issue · comments

Today, the MenuItem and its subclasses know about ActionSheetItemCell, in order for an action sheet to convert menu items to cells.

This should not be the case, since the Menu namespace should be independent from any usages. For instance, I would like to be able to create a separate MenuKit library, that does not know anything about custom action sheets.

To achieve this, I had to make CustomItem and CollectionItem non-generic and create the mapping function as @obj extensions, which allows for overrides.

This can be tested in 3.0.0-beta.