---
title: "slideshowDidChangeCurrentIndex(_:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikslideshowdatasource/slideshowdidchangecurrentindex(_:)"
---

# slideshowDidChangeCurrentIndex(_:)

Performs custom tasks when the slideshow changes to the item at the specified index.

## Declaration

```swift
optional func slideshowDidChangeCurrentIndex(_ newIndex: Int)
```

## Parameters

- `newIndex`: The index of the current item.

## Discussion

Discussion Image Kit invokes this method when the slideshow changes to the specified item. Implement this method to perform custom tasks at that time.

## See Also

### Performing Custom Tasks

- [slideshowWillStart()](quartz/ikslideshowdatasource/slideshowwillstart().md)
- [slideshowDidStop()](quartz/ikslideshowdatasource/slideshowdidstop().md)
