<!--
{
  "availability" : [
    "watchOS: 2.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ClockKit",
  "identifier" : "/documentation/ClockKit/CLKTextProvider",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ClockKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CLKTextProvider"
  },
  "title" : "CLKTextProvider"
}
-->

# CLKTextProvider

The common behavior for displaying text-based data in a complication.

```
class CLKTextProvider
```

## Overview

Typically, you don’t create instances of this class yourself. Instead, you create instances of an appropriate subclass, based on the type of text data you’re trying to create. However, you can use the [`init(format:_:)`](/documentation/ClockKit/CLKTextProvider/init(format:_:)) initializer or [`textProviderWithFormat:`](/documentation/ClockKit/CLKTextProvider/textProviderWithFormat:) class method to create a compound text provider constructed from a format string and the data from other text providers.

## Topics

### Creating a Compound Text Provider

[`init(format:_:)`](/documentation/ClockKit/CLKTextProvider/init(format:_:))

Creates and returns a text provider built from the specified format string.

[`textProviderWithFormat:`](/documentation/ClockKit/CLKTextProvider/textProviderWithFormat:)

Creates and returns a text provider built from the specified format string.

### Creating Localized Text Providers

[`localizableTextProvider(withStringsFileTextKey:)`](/documentation/ClockKit/CLKTextProvider/localizableTextProvider(withStringsFileTextKey:))

Creates a localizable simple text provider using the strings file key for the text.

[`localizableTextProvider(withStringsFileTextKey:shortTextKey:)`](/documentation/ClockKit/CLKTextProvider/localizableTextProvider(withStringsFileTextKey:shortTextKey:))

Creates a localizable simple text provider using strings file keys for both the regular text and the shorter fallback text.

[`localizableTextProvider(withStringsFileFormatKey:textProviders:)`](/documentation/ClockKit/CLKTextProvider/localizableTextProvider(withStringsFileFormatKey:textProviders:))

Creates a localizable text provider with a strings file key that resolves to a format string, and with text providers for the replacement arguments.

### Setting the Tint Color

[`tintColor`](/documentation/ClockKit/CLKTextProvider/tintColor)

The tint color to use for text.

### Supporting Accessibility

[`accessibilityLabel`](/documentation/ClockKit/CLKTextProvider/accessibilityLabel)

A localized string that describes the text.

### Creating Empty Text Providers

[`init()`](/documentation/ClockKit/CLKTextProvider/init())

Creates an empty text provider.

[`new()`](/documentation/ClockKit/CLKTextProvider/new())

Creates an empty text provider.



---

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)