attributedTitle(for:)
Returns the styled title associated with the specified state.
Declaration
func attributedTitle(for state: UIControl.State) -> NSAttributedString?Parameters
- state:
The state that uses the styled title. The possible values are described in State Swift.struct.
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 normal state. If no attributed title has been set for normal, returns nil.