<!--
{
  "availability" : [
    "tvOS: 12.0.0 - 18.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "TVMLKit",
  "identifier" : "/documentation/TVMLKit/TVInterfaceCreating/playerViewController(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TVMLKit"
    ],
    "preciseIdentifier" : "c:objc(pl)TVInterfaceCreating(im)playerViewControllerForPlayer:"
  },
  "title" : "playerViewController(for:)"
}
-->

# playerViewController(for:)

Returns the custom player user interface for a custom player.

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

## Parameters

`player`

The player requesting a 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)