---
title: "attributedTitle(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uibutton/attributedtitle(for:)"
---

# attributedTitle(for:)

Returns the styled title associated with the specified state.

## Declaration

```swift
func attributedTitle(for state: UIControl.State) -> NSAttributedString?
```

## Parameters

- `state`: The state that uses the styled title. The possible values are described in doc://com.apple.uikit/documentation/UIKit/UIControl/State-swift.struct.

## Return Value

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.

## See Also

### Managing the title

- [titleLabel](uikit/uibutton/titlelabel.md)
- [title(for:)](uikit/uibutton/title(for:).md)
- [setTitle(_:for:)](uikit/uibutton/settitle(_:for:).md)
- [setAttributedTitle(_:for:)](uikit/uibutton/setattributedtitle(_:for:).md)
- [titleColor(for:)](uikit/uibutton/titlecolor(for:).md)
- [setTitleColor(_:for:)](uikit/uibutton/settitlecolor(_:for:).md)
- [titleShadowColor(for:)](uikit/uibutton/titleshadowcolor(for:).md)
- [setTitleShadowColor(_:for:)](uikit/uibutton/settitleshadowcolor(_:for:).md)
