Initializer

init(image:landscapeImagePhone:style:target:action:)

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

Declaration

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

Parameters

image

The item’s image. If nil an image is not displayed.

landscapeImagePhone

The image to be used for the item in landscape bars in the UIUserInterfaceIdiomPhone idiom.

style

The style of the item. One of the constants defined in UIBarButtonItem.Style.

target

The object that receives the action message.

action

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

Return Value

A new item initialized to use using the specified images and other properties

See Also

Initializing an Item

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

Initializes a new item containing the specified system 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.