Instance Method

clearAllMenuItems()

Removes all programmatically added actions from the context menu.

Declaration

func clearAllMenuItems()

Discussion

Use this method to remove all menu items that you added using the addMenuItem(with:title:action:) or addMenuItem(withImageNamed:title:action:) method. This method does not remove menu items that you configured in the storyboard file.

See Also

Configuring the Context Menu

func addMenuItem(with: WKMenuItemIcon, title: String, action: Selector)

Adds an action to the context menu using a system-provided icon.

func addMenuItem(withImageNamed: String, title: String, action: Selector)

Adds an action to the context menu using an existing image resource in your Watch app bundle.

func addMenuItem(with: UIImage, title: String, action: Selector)

Adds an action to the context menu by using an image provided by your WatchKit extension.

enum WKMenuItemIcon

Template images that you can use for menus.