Instance Property

possibleTitles

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

Declaration

@property(nonatomic, copy) NSSet<NSString *> *possibleTitles;

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

target

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

action

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

style

The style of the item.

width

The width of the item.

customView

A custom view representing the item.