Contents

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 action message.

  • action:

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

Return Value

A newly initialized UIBarButtonItem.

See Also

Creating items of a specific style