<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIButton/titleLabel",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIButton(py)titleLabel"
  },
  "title" : "titleLabel"
}
-->

# titleLabel

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

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

## 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:

```objc
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:)`](/documentation/UIKit/UIButton/setTitleColor(_:for:)) and [`setTitleShadowColor(_:for:)`](/documentation/UIKit/UIButton/setTitleShadowColor(_:for:)) methods of this class to make those changes. To set the actual text of the label, use [`setTitle(_:for:)`](/documentation/UIKit/UIButton/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

[`currentTitle`](/documentation/UIKit/UIButton/currentTitle)

The current title that is displayed on the button.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)