Instance Method

titleTextAttributesForState:

Returns the title’s text attributes for a given control state.

Declaration

- (NSDictionary<NSAttributedStringKey, id> *)titleTextAttributesForState:(UIControlState)state;

Parameters

state

The control state for which you want to know the text attributes for the title.

Return Value

The title’s text attributes for state.

Discussion

The dictionary may contain key-value pairs for text attributes for the font, text color, text shadow color, and text shadow offset using the keys listed in NSString UIKit Additions Reference.

See Also

Customizing Appearance

- setTitleTextAttributes:forState:

Sets the title’s text attributes for a given control state.