---
title: "init(customView:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uibarbuttonitem/init(customview:)"
---

# init(customView:)

Creates an item using the specified custom view.

## Declaration

```swift
convenience init(customView: UIView)
```

## Parameters

- `customView`: A custom view representing the item.

## Return Value

Return Value A newly initialized UIBarButtonItem.

## Discussion

Discussion The bar button item created by this method doesn’t call the action method of its target in response to user interactions. Instead, the bar button item expects the specified custom view to handle any user interactions and provide an appropriate response.
