Contents

init(title:style:target:action:)

Creates an item using the specified title, style, target, and action.

Declaration

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

Parameters

  • title:

    The item’s title. If nil, a title doesn’t appear.

  • style:

    The style of the item. For possible values, see Style Swift.enum.

  • target:

    The object that receives the action message.

  • action:

    The action to send to target when a person selects this item.

Return Value

A newly initialized UIBarButtonItem.

See Also

Related Documentation

Creating items of a specific style