Contents

makeViewController(element:existingViewController:)

Returns a view controller for a view element.

Declaration

optional func makeViewController(element: TVViewElement, existingViewController: UIViewController?) -> UIViewController?

Parameters

  • element:

    The view element requesting a view controller.

  • existingViewController:

    The current view controller.

Return Value

The new view controller associated with the view element. If the app doesn’t handle this event, you must return nil.

Discussion

When possible, update the view controller contained in the existingViewController parameter instead of creating a new view controller.

See Also

Updating View Information