---
title: "playerViewController(for:)"
framework: tvmlkit
role: symbol
role_heading: Instance Method
path: "tvmlkit/tvinterfacecreating/playerviewcontroller(for:)"
---

# playerViewController(for:)

Returns the custom player user interface for a custom player.

## Declaration

```swift
optional func playerViewController(for player: TVPlayer) -> UIViewController?
```

## Parameters

- `player`: The player requesting a view controller.

## Return Value

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

## See Also

### Updating View Information

- [makeViewController(element:existingViewController:)](tvmlkit/tvinterfacecreating/makeviewcontroller(element:existingviewcontroller:).md)
- [makeView(element:existingView:)](tvmlkit/tvinterfacecreating/makeview(element:existingview:).md)
- [collectionViewCellClass(for:)](tvmlkit/tvinterfacecreating/collectionviewcellclass(for:).md)
