Instance Method

viewForElement:existingView:

Returns a view for a view element.

Declaration

- (UIView *)viewForElement:(TVViewElement *)element existingView:(UIView *)existingView;

Parameters

element

The view element requesting a new view.

existingView

The current view.

Return Value

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

Discussion

When possible, update the view contained in the existingView parameter instead of creating a new view. However, if the existing view is an instance of UICollectionViewCell, you must configure the cell instead of creating a new instance.

See Also

Updating View Information

- viewControllerForElement:existingViewController:

Returns a view controller 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.