init(image:landscapeImagePhone:style:target:action:)
Creates an item using the specified images, style, target, and action.
Declaration
convenience init(image: UIImage?, landscapeImagePhone: UIImage?, style: UIBarButtonItem.Style, target: Any?, action: Selector?)Parameters
- image:
The item’s image. If
nil, an image doesn’t appear. - landscapeImagePhone:
The image to use for the item in landscape bars in the Phone idiom.
- 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.