Language
Customize Menu Items
VideoEditor SDK supports full control over the menu items used in the editor UI.
Configure menu items#
The tool menu items displayed in the main menu can be configured through the VideoEditViewController
options.
The property menuItems
takes an array of PhotoEditMenuItems
.
Here, we first create an array of MenuItems
which will be converted to a PhotoEditMenuItem
.
Note that items for tools not included in your license subscription will be hidden automatically.
PhotoEditMenuItem
#
PhotoEditMenuItem
#PhotoEditMenuItem
is an enum with two possible cases:
case tool(ToolMenuItem)
represents a tool that can be pushed onto the stack. It has aToolMenuItem
as an associated value, which has a title, an icon and the class of the tool that should be instantiated.case action(ActionMenuItem)
represents an action that should be executed when this menu item is selected. It has anActionMenuItem
as an associated value, which has a title, an icon, the closure that should be executed and which can update the current video edit model, and a state closure that is used to query the active state of the action.
The .tool
case can be used to present any subclass of PhotoEditToolController
, making it easier to add your very own custom tool controllers to the SDK.