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

# textLabel

A primary text label for the view.

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

## Discussion

Accessing the value in this property causes the view to create a default label for displaying a detail text string. If you are managing the content of the view yourself by adding subviews to the [`contentView`](/documentation/UIKit/UITableViewHeaderFooterView/contentView) property, you should not access this property.

The label sizes to fit the content view area in the best way possible according to the size of the string. Its size also adjusts depending on whether there is a detail text label present.

This property is mutually exclusive with a content configuration. Setting a non-`nil` value for [`contentConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/contentConfiguration-6b4eg) resets this property to `nil`.

---

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)