<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/accordionFoldTransition()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)accordionFoldTransitionFilter"
  },
  "title" : "accordionFoldTransition()"
}
-->

# accordionFoldTransition()

Transitions by folding and crossfading an image to reveal the target image.

```
class func accordionFoldTransition() -> any CIFilter & CIAccordionFoldTransition
```

## Return Value

The transition image.

## Discussion

This method applies the accordion fold transition filter to an image. The effect transitions from one image to another by unfolding and crossfading.

The accordion fold transition filter uses the following properties:

- `inputImage`: The starting image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `targetImage`: The ending image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `time`: A `float` representing the parametric time of the transition from start (at time 0) to end (at time 1) as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `numberOfFolds`: A `float` representing the number of accordion folds as a <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `foldShadowAmount`: A `float` representing the strength of the shadow as a <doc://com.apple.documentation/documentation/Foundation/NSNumber>.

The following code creates a filter that produces folds in the input image and fades to the target image:

```swift
func accordionFold(inputImage: CIImage, targetImage: CIImage) -> CIImage {
    let accordionFoldTransiton = CIFilter.accordionFoldTransition()
    accordionFoldTransiton.inputImage = inputImage
    accordionFoldTransiton.targetImage = targetImage
    accordionFoldTransiton.time = 0.5
    accordionFoldTransiton.numberOfFolds = 6
    accordionFoldTransiton.foldShadowAmount = 2
    return accordionFoldTransiton.outputImage!
}
```

![Three photographs. In the photo on the left, multiple sets of small purple flowers are photographed close up with good lighting, and the background has a slight blur. In the photograph on the right is a tall city building with two trees directly in front of the building. In the center photo, a bar swipe transition is applied, resulting in a still photograph of the moving transition. The left photograph is overlaid on the right photo and slowly folding up to reveal the target image.](images/com.apple.coreimage/media-3616429@2x.png)

---

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)