---
title: "makeView(element:existingView:)"
framework: tvmlkit
role: symbol
role_heading: Instance Method
path: "tvmlkit/tvinterfacecreating/makeview(element:existingview:)"
---

# makeView(element:existingView:)

Returns a view for a view element.

## Declaration

```swift
optional func makeView(element: TVViewElement, existingView: UIView?) -> UIView?
```

## Parameters

- `element`: The view element requesting a new view.
- `existingView`: The current view.

## Mentioned in

Creating TVML Elements

## Return Value

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

## Discussion

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

- [makeViewController(element:existingViewController:)](tvmlkit/tvinterfacecreating/makeviewcontroller(element:existingviewcontroller:).md)
- [collectionViewCellClass(for:)](tvmlkit/tvinterfacecreating/collectionviewcellclass(for:).md)
- [playerViewController(for:)](tvmlkit/tvinterfacecreating/playerviewcontroller(for:).md)
