Enumeration

NSFormattingContext

The formatting context for a formatter.

Declaration

typedef enum NSFormattingContext : NSInteger {
    ...
} NSFormattingContext;

Overview

Use formatting contexts to specify where the result of formatting will appear, so that the formatter can provide the most appropriate result.

For example, when formatting a date or date symbol for a French locale, you want the month name to be capitalized if it appears at the beginning of the sentence (“Juin est mon mois de naissance”), but not if it appears elsewhere (“Mon mois de naissance est juin”).

If the formatting context isn't known ahead of time, specify NSFormattingContextDynamic to have the system determine the context automatically.

Topics

Constants

NSFormattingContextUnknown

An unknown formatting context.

NSFormattingContextDynamic

A formatting context determined automatically at runtime.

NSFormattingContextStandalone

The formatting context for stand-alone usage.

NSFormattingContextListItem

The formatting context for a list or menu item.

NSFormattingContextBeginningOfSentence

The formatting context for the beginning of a sentence.

NSFormattingContextMiddleOfSentence

The formatting context for the middle of a sentence.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software