Instance Property

possibleTitles

The set of possible titles to display on the bar button.

Declaration

var possibleTitles: Set<String>? { get set }

Discussion

Use this property to provide a hint to the system on how to correctly size the bar button item to be wide enough to accommodate your widest title. Set the value of this property to an NSSet object containing all the titles you intend as possible titles for the bar button item. Use the actual text strings you intend to display.

This property applies to bar button items placed on navigation bars or toolbars.

See Also

Getting and Setting Properties

var target: AnyObject?

The object that receives an action when the item is selected.

var action: Selector?

The selector defining the action message to send to the target object when the user taps this bar button item.

var style: UIBarButtonItem.Style

The style of the item.

var width: CGFloat

The width of the item.

var customView: UIView?

A custom view representing the item.