Instance Method

viewControllerForElement:existingViewController:

Returns a view controller for a view element.

Declaration

- (UIViewController *)viewControllerForElement:(TVViewElement *)element existingViewController:(UIViewController *)existingViewController;

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

- viewForElement:existingView:

Returns a view for a view element.

- collectionViewCellClassForElement:

Returns a collection view cell for the specified element.

- playerViewControllerForPlayer:

Returns the custom player user interface for a custom player.