<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBarButtonItem/init(title:image:primaryAction:menu:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So15UIBarButtonItemC5UIKitE5title5image13primaryAction4menuABSSSg_So7UIImageCSgSo8UIActionCSgSo6UIMenuCSgtcfc"
  },
  "title" : "init(title:image:primaryAction:menu:)"
}
-->

# init(title:image:primaryAction:menu:)

Creates a plain-style item using the specified title, image, primary action, and context menu.

```
@MainActor @preconcurrency convenience init(title: String? = nil, image: UIImage? = nil, primaryAction: UIAction? = nil, menu: UIMenu? = nil)
```

## Parameters

`title`

The item’s title.

`image`

The item’s image.

    The images displayed on the bar derive from this image. If this image is too large to fit on the bar, it’s scaled to fit. Typically, the size of a toolbar and navigation bar image is     `20`     x     `20`     points. The system uses the alpha values in the source image to create the images, ignoring opaque values.

`primaryAction`

A [`UIAction`](/documentation/UIKit/UIAction) to associate with the item, which the item uses to configure its title and image. If you specify `primaryAction`, it takes precedence over `title` and `image`.

`menu`

The menu to present. The context menu displays in response to a person tapping the item.

## Return Value

A newly initialized [`UIBarButtonItem`](/documentation/UIKit/UIBarButtonItem).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)