---
title: titleLabel
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uibutton/titlelabel
---

# titleLabel

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

## Declaration

```swift
var titleLabel: UILabel? { get }
```

## Discussion

Discussion Although this property is read-only, its own properties are read/write. Use these properties primarily to configure the text of the button. For example: UIButton *button                  = [UIButton buttonWithType: UIButtonTypeSystem]; button.titleLabel.font            = [UIFont systemFontOfSize: 12]; button.titleLabel.lineBreakMode   = NSLineBreakByTruncatingTail; Do not use the label object to set the text color or the shadow color. Instead, use the setTitleColor(_:for:) and setTitleShadowColor(_:for:) methods of this class to make those changes. To set the actual text of the label, use setTitle(_:for:) (button.titleLabel.text does not let you set the text). The titleLabel property returns a value even if the button has not been displayed yet. The value of the property is  nil for system buttons.

## See Also

### Related Documentation

- [currentTitle](uikit/uibutton/currenttitle.md)

### Managing the title

- [title(for:)](uikit/uibutton/title(for:).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)
