Instance Method

titleForState:

Returns the title associated with the specified state.

Declaration

- (NSString *)titleForState:(UIControlState)state;

Parameters

state

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

Return Value

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

See Also

Configuring the Button Title

titleLabel

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

- setTitle:forState:

Sets the title to use for the specified state.

- attributedTitleForState:

Returns the styled title associated with 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.