MenuItem
public enum MenuItem
A MenuItem
represents an item in the menu. It can either be a tool controller, an action or a
visual separator.
-
A tool with a label, an icon and the photo edit tool controller subclass.
Declaration
Swift
case tool(String, UIImage, PhotoEditToolController)
-
An action with a label, an icon, a closure to execute and an optional closure for the enabled/disabled state of the action.
Declaration
Swift
case action(String, UIImage, (inout PhotoEditModel) -> Void, ((PhotoEditModel) -> Bool)?)
-
A visual separator.
Declaration
Swift
case separator
-
The default items that will be used for the main menu.
Declaration
Swift
public static func defaultItems(with configuration: Configuration) -> [MenuItem]
Parameters
configuration
A configuration instance to use to configure the tools.
Return Value
An array with the default menu items.