Instance Method

setTitleTextAttributes:forState:

Sets the text attributes of the title for a given control state.

Declaration

- (void)setTitleTextAttributes:(NSDictionary<NSAttributedStringKey, id> *)attributes forState:(UIControlState)state;

Parameters

attributes

The text attributes of the title for state.

state

A control state.

Discussion

The attributes dictionary can specify the font, text color, text shadow color, and text shadow offset for the title in the text attributes dictionary, using the keys in NSString UIKit Additions Reference.

See Also

Customizing Appearance

- backgroundImageForState:barMetrics:

Returns the background image for a given state and bar metrics.

- setBackgroundImage:forState:barMetrics:

Sets the background image for a given state and bar metrics.

- contentPositionAdjustmentForSegmentType:barMetrics:

Returns the positioning offset for a given segment and bar metrics.

- setContentPositionAdjustment:forSegmentType:barMetrics:

Returns the content positioning offset for a given segment and bar metrics.

- dividerImageForLeftSegmentState:rightSegmentState:barMetrics:

Returns the divider image used for a given combination of left and right segment states and bar metrics.

- setDividerImage:forLeftSegmentState:rightSegmentState:barMetrics:

Sets the divider image used for a given combination of left and right segment states and bar metrics.

- titleTextAttributesForState:

Returns the text attributes of the title for a given control state.