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.
Today, the
MenuItem
and its subclasses know aboutActionSheetItemCell
, 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 separateMenuKit
library, that does not know anything about custom action sheets.