init(textMarkupAttributes:textSelector:)
Creates a text style rule object with the specified style attributes and text range information.
Declaration
init?(textMarkupAttributes: [String : Any] = [:], textSelector: String?)Parameters
- textMarkupAttributes:
A dictionary of style attributes. For a list of supported keys and values that you can include in this dictionary, see
CMTextMarkup.h. - textSelector:
A string contains an identifier for the ranges of text to which the style attributes should be applied. Eligible identifiers are determined by the media format and its corresponding text content. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup. Specify
nilif you want the style attributes to apply to all text in the item.
Return Value
A text style rule object initialized with the specified attributes and range information.