Class

CLKTimeTextProvider

A formatted time value.

Declaration

@interface CLKTimeTextProvider : CLKTextProvider

Overview

This provider supports time values in either the 24-hour or 12-hour format and takes into account the user’s region and locale settings. As needed, the provider automatically shortens the string to fit the available space.

When formatting the time, the time text provider drops the morning/evening indicator if it can’t fit the entire time value. For example, a provider configured to display the time 10:09AM in the English-US locale would remove elements as follows until it encountered a string that fit the available space:

  • 10:09AM

  • 10:09

Topics

Creating a Text Provider

+ textProviderWithDate:

Creates and returns a text provider for displaying the specified time.

+ textProviderWithDate:timeZone:

Creates and returns a text provider for displaying the specified time.

Getting the Time Information

date

The date object containing the time value.

timeZone

The time zone used to format time values.

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.

CLKSimpleTextProvider

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

CLKTextProvider

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

CLKTimeIntervalTextProvider

A formatted time range.

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.