---
title: "run(with:inMode:options:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikslideshow/run(with:inmode:options:)"
---

# run(with:inMode:options:)

Runs a slideshow that contains the specified kind of items, provided from a data source.

## Declaration

```swift
func run(with dataSource: (any IKSlideshowDataSource)!, inMode slideshowMode: String!, options slideshowOptions: [AnyHashable : Any]! = [:])
```

## Parameters

- `dataSource`: The data source to use for the slideshow.
- `slideshowMode`: A constant that indicate what kind of items are in the slideshow—IKSlideshowModeImages, IKSlideshowModePDF, or IKSlideshowModeQuickLook. See doc://com.apple.quartz/documentation/Quartz/slideshow-modes.
- `slideshowOptions`: A dictionary of slideshow options. See doc://com.apple.quartz/documentation/Quartz/slideshow-option-keys.

## See Also

### Running and Stopping a Slideshow

- [stop(_:)](quartz/ikslideshow/stop(_:).md)
- [autoPlayDelay](quartz/ikslideshow/autoplaydelay.md)
