Class

TVDocumentViewController

A view controller that represents a TVMLKit document.

Declaration

class TVDocumentViewController : UIViewController

Overview

Instances of this class serve as bridges into TVMLKit JS's document life cycle, and allow for native event handling with TVMLKit. This class also provides a way for native clients to communicate with TVMLKit JS.

Topics

Initializing the Document View Controller

init(context: [String : Any], for: TVApplicationController)

Creates a new document view controller with a specific context and app controller.

Managing Interactions with the Document

var delegate: TVDocumentViewControllerDelegate?

The delegate for handling events in the document view controller.

protocol TVDocumentViewControllerDelegate

Methods to manage updates, events, and errors from the document view controller.

Handling Document Events

struct TVDocumentViewController.Event

Events that can be triggered on the document view controller.

Updating the Document View Controller

func update(using: [String : Any])

Updates the document view controller with the provided context.

Accessing the Document's Components

var appController: TVApplicationController?

The document's app controller that bridges UI, navigation stack, storage, and event handling from JavaScript.

var documentContext: [String : Any]

The current document context.

See Also

Views and View Controllers

class TVViewElement

A representation of a read-only DOM node.

protocol TVInterfaceCreating

A protocol that defines methods used to create views and view controllers.

class TVInterfaceFactory

A factory for the creation of views and view controllers.

class TVBrowserViewController

A view controller that presents content in a browsable, full-screen format.