---
title: collectionView
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionviewcontroller/collectionview
---

# collectionView

The collection view object managed by this view controller.

## Declaration

```swift
var collectionView: UICollectionView! { get set }
```

## Discussion

Discussion If you assign a new collection view object to this property and that view’s data source or delegate aren’t yet set, the collection view controller makes itself the delegate or data source or both.

## See Also

### Getting the collection view

- [collectionViewLayout](uikit/uicollectionviewcontroller/collectionviewlayout.md)
