-
Creates a menu item for a tool.
Declaration
Swift
public init(title: String, icon: UIImage, tool: PhotoEditToolController)
Parameters
title
The title of the tool.
icon
The icon of the tool.
tool
The tool to present when this menu item is selected.
-
Creates a menu item for an action.
Declaration
Swift
public init(title: String, icon: UIImage, action: @escaping (_ObjCPhotoEditModel) -> _ObjCPhotoEditModel, state: ((_ObjCPhotoEditModel) -> Bool)?)
Parameters
title
The title of the action.
icon
The icon of the action.
action
The action to execute when this menu item is selected.
state
An optional closure to call to get the enabled/disabled state of the action.
-
Creates a separator menu item.
Declaration
Swift
public override init()
-
The title of the boxed menu item, if any.
Declaration
Swift
open var title: String?
-
The icon of the menu item, if any.
Declaration
Swift
open var icon: UIImage?
-
The tool of the menu item, if any.
Declaration
Swift
open var tool: PhotoEditToolController?
-
The action of the menu item, if any.
Declaration
Swift
open var action: ((_ObjCPhotoEditModel) -> _ObjCPhotoEditModel)?
-
The closure to call to get the enabled/disabled state of the action, if any.
Declaration
Swift
open var state: ((_ObjCPhotoEditModel) -> Bool)?
-
Creates a boxed version of the default menu items.
Declaration
Swift
open class func defaultItems(with configuration: Configuration) -> [_ObjCMenuItem]
Parameters
configuration
The configuration instance to use to configure the default menu items.
Return Value
A boxed version of the default menu items.