UIBarButtonItem class

UIBarButtonItem

Inheritance
Available extensions

Constructors

UIBarButtonItem.new()
Returns a new instance of UIBarButtonItem constructed with the default new method.
factory
UIBarButtonItem.castFrom(ObjCObjectBase other)
Constructs a UIBarButtonItem that points to the same underlying object as other.
UIBarButtonItem.castFromPointer(Pointer<ObjCObject> other, {bool retain = false, bool release = false})
Constructs a UIBarButtonItem that wraps the given raw object pointer.

Properties

action Pointer<ObjCSelector>

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

action
getter/setter pair
buttonGroup UIBarButtonItemGroup?

Available on UIBarButtonItem, provided by the UIBarButtonItemGroup$1 extension

The group that the UIBarButtonItem is currently associated with, either as a member of the barButtonItems array or as that group's representativeItem.
no setter
changesSelectionAsPrimaryAction bool

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

Indicates if the button changes selection as its primary action. This shows the menu as options for selection if a menu is populated and no action when tapped is enabled. If no menu is provided and no action is enabled when tapped, the item is toggled on and off for the primary action.
getter/setter pair
customView UIView?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

customView
getter/setter pair
enabled bool

Available on UIBarItem, provided by the UIBarItem$Methods extension

isEnabled
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
image UIImage?

Available on UIBarItem, provided by the UIBarItem$Methods extension

image
getter/setter pair
imageInsets UIEdgeInsets

Available on UIBarItem, provided by the UIBarItem$Methods extension

imageInsets
getter/setter pair
landscapeImagePhone UIImage?

Available on UIBarItem, provided by the UIBarItem$Methods extension

landscapeImagePhone
getter/setter pair
landscapeImagePhoneInsets UIEdgeInsets

Available on UIBarItem, provided by the UIBarItem$Methods extension

landscapeImagePhoneInsets
getter/setter pair
largeContentSizeImage UIImage?

Available on UIBarItem, provided by the UIBarItem$Methods extension

largeContentSizeImage
getter/setter pair
largeContentSizeImageInsets UIEdgeInsets

Available on UIBarItem, provided by the UIBarItem$Methods extension

largeContentSizeImageInsets
getter/setter pair

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

When non-nil the menu is presented, the gesture used to trigger the menu is based on if the bar button item would normally trigger an action when tapped.
getter/setter pair
possibleTitles ↔ NSSet?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

possibleTitles
getter/setter pair
primaryAction UIAction?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

Set the primaryAction on this item, updating the title & image of the item if appropriate (primaryAction is non-nil, and this is not a system item). When primaryAction is non-nil, the target & action properties are ignored. If primaryAction is set to nil, the title & image properties are left unchanged.
getter/setter pair
ref → ObjCObjectRef
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

isSelected
getter/setter pair
style UIBarButtonItemStyle

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

style
getter/setter pair
tag int

Available on UIBarItem, provided by the UIBarItem$Methods extension

tag
getter/setter pair
target ↔ ObjCObjectBase?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

target
getter/setter pair
tintColor UIColor?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

tintColor
getter/setter pair
title ↔ NSString?

Available on UIBarItem, provided by the UIBarItem$Methods extension

title
getter/setter pair
width double

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

width
getter/setter pair

Methods

backButtonBackgroundImageForState(UIControlState state, {required UIBarMetrics barMetrics}) UIImage?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

backButtonBackgroundImageForState:barMetrics:
backButtonBackgroundVerticalPositionAdjustmentForBarMetrics(UIBarMetrics barMetrics) double

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

backButtonBackgroundVerticalPositionAdjustmentForBarMetrics:
backButtonTitlePositionAdjustmentForBarMetrics(UIBarMetrics barMetrics) UIOffset

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

backButtonTitlePositionAdjustmentForBarMetrics:
backgroundImageForState(UIControlState state, {required UIBarMetrics barMetrics}) UIImage?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

backgroundImageForState:barMetrics:
backgroundImageForState$1(UIControlState state, {required UIBarButtonItemStyle style$1, required UIBarMetrics barMetrics}) UIImage?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

backgroundImageForState:style:barMetrics:
backgroundVerticalPositionAdjustmentForBarMetrics(UIBarMetrics barMetrics) double

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

backgroundVerticalPositionAdjustmentForBarMetrics:
encodeWithCoder(NSCoder coder) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

encodeWithCoder:
encodeWithCoder(NSCoder coder) → void

Available on UIBarItem, provided by the UIBarItem$Methods extension

encodeWithCoder:
init() UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

init
init() UIBarItem

Available on UIBarItem, provided by the UIBarItem$Methods extension

init
initWithBarButtonSystemItem(UIBarButtonSystemItem systemItem, {ObjCObjectBase? target, required Pointer<ObjCSelector> action}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

initWithBarButtonSystemItem:target:action:
initWithBarButtonSystemItem$1(UIBarButtonSystemItem systemItem, {UIAction? primaryAction}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

Creates a bar button item for the given systemItem. The primaryAction is copied, and its title & image are ignored.
initWithBarButtonSystemItem$2(UIBarButtonSystemItem systemItem, {UIMenu? menu}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

Creates a bar button item for the given systemItem. The constructed item will present the menu immediately when touched.
initWithCoder(NSCoder coder) UIBarButtonItem?

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

initWithCoder:
initWithCoder(NSCoder coder) UIBarItem?

Available on UIBarItem, provided by the UIBarItem$Methods extension

initWithCoder:
initWithCustomView(UIView customView) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

initWithCustomView:
initWithImage(UIImage? image, {required UIBarButtonItemStyle style, ObjCObjectBase? target, required Pointer<ObjCSelector> action}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

initWithImage:style:target:action:
initWithImage$1(UIImage? image, {UIImage? landscapeImagePhone, required UIBarButtonItemStyle style, ObjCObjectBase? target, required Pointer<ObjCSelector> action}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

initWithImage:landscapeImagePhone:style:target:action:
initWithImage$2(UIImage? image, {UIMenu? menu}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

Creates a plain-style bar button item with the given item. The constructed item will present the menu immediately when touched.
initWithPrimaryAction(UIAction? primaryAction) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

Creates a plain-style bar button item from the properties of primaryAction. primaryAction is copied.
initWithTitle(NSString? title, {required UIBarButtonItemStyle style, ObjCObjectBase? target, required Pointer<ObjCSelector> action}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

initWithTitle:style:target:action:
initWithTitle$1(NSString? title, {UIMenu? menu}) UIBarButtonItem

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

Creates a plain-style bar button item with the given title. The constructed item will present the menu immediately when touched.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBackButtonBackgroundImage(UIImage? backgroundImage, {required UIControlState forState, required UIBarMetrics barMetrics}) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

setBackButtonBackgroundImage:forState:barMetrics:
setBackButtonBackgroundVerticalPositionAdjustment(double adjustment, {required UIBarMetrics forBarMetrics}) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

setBackButtonBackgroundVerticalPositionAdjustment:forBarMetrics:
setBackButtonTitlePositionAdjustment(UIOffset adjustment, {required UIBarMetrics forBarMetrics}) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

setBackButtonTitlePositionAdjustment:forBarMetrics:
setBackgroundImage(UIImage? backgroundImage, {required UIControlState forState, required UIBarMetrics barMetrics}) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

setBackgroundImage:forState:barMetrics:
setBackgroundImage$1(UIImage? backgroundImage, {required UIControlState forState, required UIBarButtonItemStyle style$1, required UIBarMetrics barMetrics}) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

setBackgroundImage:forState:style:barMetrics:
setBackgroundVerticalPositionAdjustment(double adjustment, {required UIBarMetrics forBarMetrics}) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

setBackgroundVerticalPositionAdjustment:forBarMetrics:
setTitlePositionAdjustment(UIOffset adjustment, {required UIBarMetrics forBarMetrics}) → void

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

setTitlePositionAdjustment:forBarMetrics:
setTitleTextAttributes(NSDictionary? attributes, {required UIControlState forState}) → void

Available on UIBarItem, provided by the UIBarItem$Methods extension

setTitleTextAttributes:forState:
titlePositionAdjustmentForBarMetrics(UIBarMetrics barMetrics) UIOffset

Available on UIBarButtonItem, provided by the UIBarButtonItem$Methods extension

titlePositionAdjustmentForBarMetrics:
titleTextAttributesForState(UIControlState state) → NSDictionary?

Available on UIBarItem, provided by the UIBarItem$Methods extension

titleTextAttributesForState:
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

alloc() UIBarButtonItem
alloc
override
allocWithZone(Pointer<NSZone> zone) UIBarButtonItem
allocWithZone:
override
appearance() UIBarButtonItem
appearance
override
appearanceForTraitCollection(UITraitCollection trait) UIBarButtonItem
appearanceForTraitCollection:
override
appearanceForTraitCollection$1(UITraitCollection trait, {UIAppearanceContainer? whenContainedIn}) UIBarButtonItem
appearanceForTraitCollection:whenContainedIn:
override
appearanceForTraitCollection$2(UITraitCollection trait, {required NSArray whenContainedInInstancesOfClasses}) UIBarButtonItem
appearanceForTraitCollection:whenContainedInInstancesOfClasses:
override
appearanceWhenContainedIn(UIAppearanceContainer? ContainerClass) UIBarButtonItem
appearanceWhenContainedIn:
override
appearanceWhenContainedInInstancesOfClasses(NSArray containerTypes) UIBarButtonItem
appearanceWhenContainedInInstancesOfClasses:
override
fixedSpaceItemOfWidth(double width) UIBarButtonItem
Construct a new fixed space item with the given width.
flexibleSpaceItem() UIBarButtonItem
Construct a new flexible space item.
isInstance(ObjCObjectBase obj) bool
Returns whether obj is an instance of UIBarButtonItem.
override
new$() UIBarButtonItem
new
override