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

# collectionViewCellClass(for:)

Returns a collection view cell for the specified element.

## Declaration

```swift
optional func collectionViewCellClass(for element: TVViewElement) -> AnyClass?
```

## Parameters

- `element`: The element a collection view cell is created for.

## Return Value

Return Value The new collection view cell associated with the given element name.

## Discussion

Discussion The collection view cell must be in a list, shelf, or grid. This method is called once per unique element name as a common cell class is used for all elements that share the same name in a collection. Return nil for default handling.

## See Also

### Updating View Information

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