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
menuItems takes an array of
Here, we first create an array of
MenuItems which will be converted to a
Note that items for tools not included in your license subscription will be hidden automatically.
PhotoEditMenuItem is an enum with two possible cases:
case tool(ToolMenuItem)represents a tool that can be pushed onto the stack. It has a
ToolMenuItemas 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 an
ActionMenuItemas 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.
.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.