Class

CLKTextProvider

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

Overview

You do not create instances of this class yourself. Instead, you create instances of an appropriate subclass, based on the type of text data you are trying to create. You can also use the textProviderWithFormat: class method to create a generic text provider constructed from a format string and the data from other text provider.

Topics

Creating Localized Text Providers

class func localizableTextProvider(withStringsFileTextKey: String)

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

class func localizableTextProvider(withStringsFileTextKey: String, shortTextKey: String?)

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

class func localizableTextProvider(withStringsFileFormatKey: String, textProviders: [CLKTextProvider])

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

var tintColor: UIColor

The tint color to use for text.

Relationships

Inherits From

See Also

Data Providers

class CLKDateTextProvider

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

class CLKImageProvider

An image displayed by a complication.

class CLKRelativeDateTextProvider

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

class CLKSimpleTextProvider

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

class CLKTimeIntervalTextProvider

A formatted time range.

class CLKTimeTextProvider

A formatted time value.