Class

CLKSimpleTextProvider

A single line of text to display in your complication interface.

Declaration

@interface CLKSimpleTextProvider : CLKTextProvider

Overview

Use a simple text provider to specify strings for your complications. The simple text object handles the formatting of that string in your complication, which may include tinting it to match the color of the clock face.

When creating a simple text provider, you can specify both a long version and a short version of your text. Providing both strings gives you more control over the text displayed by your complication. When the long string does not fit in the available space, the text provider tries to display the value in the shortText property instead. If the shorter version is still too long, it displays a truncated version of the longer text.

Topics

Creating a Text Provider

+ textProviderWithText:

Creates and returns a text provider with the specified long form text.

+ textProviderWithText:shortText:

Creates and returns a text provider with both long and short versions of the text.

+ textProviderWithText:shortText:accessibilityLabel:

Creates and returns a text provider with the text strings and an accessible string.

Getting the Text

text

The long version of text that you want to display.

shortText

A shorter version of the text.

Relationships

Inherits From

See Also

Data Providers

CLKDateTextProvider

A formatted string that conveys a date without any time information.

CLKImageProvider

An image displayed by a complication.

CLKFullColorImageProvider

A full-color image displayed by a complication.

CLKRelativeDateTextProvider

A formatted string that conveys the difference in time between the current date and a date that you specify.

CLKTextProvider

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

CLKTimeIntervalTextProvider

A formatted time range.

CLKTimeTextProvider

A formatted time value.

CLKSimpleGaugeProvider

A gauge that shows a fractional value.

CLKTimeIntervalGaugeProvider

A gauge that tracks time intervals.

CLKGaugeProvider

An abstract superclass that provides all the common behaviors for the gauge providers.

CLKSimpleGaugeProviderFillFractionEmpty

A fill value indicating an empty gauge.

CLKGaugeProviderStyle

Visual styles available for gauges.