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

# makeViewController(element:existingViewController:)

Returns a view controller for a view element.

```
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.

---

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)