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

# title(for:)

Returns the title associated with the specified state.

## Declaration

```swift
func title(for state: UIControl.State) -> String?
```

## Parameters

- `state`: The state that uses the 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 title has been set for the specific state, this method returns the title associated with the normal state.

## See Also

### Managing the title

- [titleLabel](uikit/uibutton/titlelabel.md)
- [setTitle(_:for:)](uikit/uibutton/settitle(_:for:).md)
- [attributedTitle(for:)](uikit/uibutton/attributedtitle(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)
