initWithFormat:options:locale:
Initializes an attributed string by substituting arguments into a specially formatted string.
Declaration
- (instancetype) initWithFormat:(NSAttributedString *) format options:(NSAttributedStringFormattingOptions) options locale:(NSLocale *) locale;Parameters
- format:
The format string to use to create the final string. For a list of format specifiers you can include in this string, see TP40004265.
- options:
Options for how to apply attributes to the string’s content.
- locale:
The locale to use for formatting the string. The locale controls the formatting of region-sensitive values such as numbers and currencies.
Return Value
An initialized attributed string that combines the format string with the provided arguments and other information.
Discussion
Pass an optional list of trailing variadic arguments to substitute into the format string.
See Also
Creating a formatted string
initWithFormat:options:locale:arguments:initWithFormat:options:locale:context:initWithFormat:options:locale:context:arguments:localizedAttributedStringWithFormat:localizedAttributedStringWithFormat:options:localizedAttributedStringWithFormat:context:localizedAttributedStringWithFormat:options:context:NSAttributedStringFormattingOptions