Class

AVTextStyleRule

An object that represents text styling rules applied to text in a media item.

Declaration

class AVTextStyleRule : NSObject

Overview

You use text style objects to format subtitles, closed captions, and other text-related content of the item. The system applies these rules to all or part of the text of the media item.

Topics

Creating and Initializing Style Rules

class func textStyleRules(fromPropertyList: Any) -> [AVTextStyleRule]?

Creates an array of text style rule objects from the specified property-list object.

init?(textMarkupAttributes: [String : Any])

Creates a text style rule object with the specified style attributes.

init?(textMarkupAttributes: [String : Any], textSelector: String?)

Creates a text style rule object with the specified style attributes and text range information.

Accessing the Style Attributes

var textMarkupAttributes: [String : Any]

A dictionary of text style attributes to apply to the text.

var textSelector: String?

A string that identifies the text to which the attributes should apply.

Exporting the Style Rules

class func propertyList(for: [AVTextStyleRule]) -> Any

Converts one or more text style rules into a serializable property list object.

Relationships

Inherits From

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