<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/QLPreviewController/dataSource",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "c:objc(cs)QLPreviewController(py)dataSource"
  },
  "title" : "dataSource"
}
-->

# dataSource

The preview controller’s data source.

```
weak var dataSource: (any QLPreviewControllerDataSource)? { get set }
```

## Discussion

To use a Quick Look preview controller, you need to implement a data source. The data source is responsible for providing items for display by the controller, and for telling it how many items to include in the preview navigation list. To learn more about implementing a data source, see [`QLPreviewControllerDataSource`](/documentation/QuickLook/QLPreviewControllerDataSource).

---

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)