Instance Method

attributedTitleForState:

Returns the styled title associated with the specified state.

Declaration

- (NSAttributedString *)attributedTitleForState:(UIControlState)state;

Parameters

state

The state that uses the styled title. The possible values are described in UIControlState.

Return Value

The title for the specified state. If no attributed title has been set for the specific state, this method returns the attributed title associated with the UIControlStateNormal state. If no attributed title has been set for UIControlStateNormal, returns nil.

See Also

Configuring the Button Title

titleLabel

A view that displays the value of the currentTitle property for a button.

- titleForState:

Returns the title associated with the specified state.

- setTitle:forState:

Sets the title to use for the specified state.

- setAttributedTitle:forState:

Sets the styled title to use for the specified state.

- titleColorForState:

Returns the title color used for a state.

- setTitleColor:forState:

Sets the color of the title to use for the specified state.

- titleShadowColorForState:

Returns the shadow color of the title used for a state.

- setTitleShadowColor:forState:

Sets the color of the title shadow to use for the specified state.

reversesTitleShadowWhenHighlighted

A Boolean value that determines whether the title shadow changes when the button is highlighted.