---
title: "addMenuItem(withImageNamed:title:action:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacecontroller/addmenuitem(withimagenamed:title:action:)"
---

# addMenuItem(withImageNamed:title:action:)

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

## Declaration

```swift
func addMenuItem(withImageNamed imageName: String, title: String, action: Selector)
```

## Parameters

- `imageName`: The name of the image to be loaded from your Watch app’s bundle. Include the filename extension in the name. This parameter must not be nil.
- `title`: The title string to be displayed underneath the image. Title strings should be reasonably short. Any text that cannot be displayed is truncated. This parameter must not be nil or an empty string.
- `action`: The action method to be called when the action is tapped. The method must be defined on the current interface controller object. This parameter must not be nil.

## Discussion

Discussion Use this method to append an action to the interface controller’s context menu. If the menu already has four items, additional items are ignored.

## See Also

### Deprecated symbols

- [Text Response Key](watchkit/text-response-key.md)
- [addMenuItem(with:title:action:)](watchkit/wkinterfacecontroller/addmenuitem(with:title:action:)-6pb4t.md)
- [addMenuItem(with:title:action:)](watchkit/wkinterfacecontroller/addmenuitem(with:title:action:)-1q2zj.md)
- [beginGlanceUpdates()](watchkit/wkinterfacecontroller/beginglanceupdates().md)
- [clearAllMenuItems()](watchkit/wkinterfacecontroller/clearallmenuitems().md)
- [endGlanceUpdates()](watchkit/wkinterfacecontroller/endglanceupdates().md)
- [handleUserActivity(_:)](watchkit/wkinterfacecontroller/handleuseractivity(_:).md)
- [presentController(_:)](watchkit/wkinterfacecontroller/presentcontroller(_:).md)
- [reloadRootControllers(withNames:contexts:)](watchkit/wkinterfacecontroller/reloadrootcontrollers(withnames:contexts:).md)
- [updateUserActivity(_:userInfo:webpageURL:)](watchkit/wkinterfacecontroller/updateuseractivity(_:userinfo:webpageurl:).md)
- [WKMenuItemIcon](watchkit/wkmenuitemicon.md)
