UIMenuBuilder
An interface for adding and removing menus from a menu system.
Declaration
@MainActor protocol UIMenuBuilderMentioned in
Overview
You don’t create a menu builder object. Instead, you override buildMenu(with:) in your app delegate or view controller to receive a builder object. Where you override this method determines the system that the builder updates. To add and remove menus from the menu bar using the main menu system, override buildMenu(with:) in your app delegate. To build a context menu using the context system, override the method in your view controller.
To see an example of how to use a menu builder object, see Adding menus and shortcuts to the menu bar and user interface.
Topics
Getting menu systems and elements
Inserting child menus
Inserting sibling menus
Replacing menus and child menu elements
Removing a menu
Instance Methods
insertElements(_:afterAction:)insertElements(_:afterCommand:propertyList:)insertElements(_:afterMenu:)insertElements(_:atEndOfMenu:)insertElements(_:atStartOfMenu:)insertElements(_:beforeAction:)insertElements(_:beforeCommand:propertyList:)insertElements(_:beforeMenu:)remove(action:)remove(command:propertyList:)replace(action:with:)replace(command:propertyList:with:)replace(menu:with:)replace(menu:with:)