Initializer

init(barButtonSystemItem:target:action:)

Initializes a new item containing the specified system item.

Declaration

convenience init(barButtonSystemItem systemItem: UIBarButtonItem.SystemItem, target: Any?, action: Selector?)

Parameters

systemItem

The system item to use as the first item on the bar. One of the constants defined in UIBarButtonItem.SystemItem.

target

The object that receives the action message.

action

The action to send to target when this item is selected.

Return Value

A newly initialized item containing the specified system item. The item’s target is nil.

See Also

Initializing an Item

init(customView: UIView)

Initializes a new item using the specified custom view.

init(image: UIImage?, style: UIBarButtonItem.Style, target: Any?, action: Selector?)

Initializes a new item using the specified image and other properties.

init(title: String?, style: UIBarButtonItem.Style, target: Any?, action: Selector?)

Initializes a new item using the specified title and other properties.

init()

Initializes the bar button item to its default state.