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
actionmessage. - action:
The action to send to
targetwhen a person selects this item.
Return Value
A newly initialized UIBarButtonItem.