<!--
{
  "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/affineTile()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)affineTileFilter"
  },
  "title" : "affineTile()"
}
-->

# affineTile()

Performs a transform on the image and tiles the result.

```
class func affineTile() -> any CIFilter & CIAffineTile
```

## Return Value

The tiled image.

## Discussion

This method applies the affine tile filter to an image. This effect performs an <doc://com.apple.documentation/documentation/CoreFoundation/CGAffineTransform> and then tiles the transformed image.

The affine tile filter uses the following properties:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `transform`: A <doc://com.apple.documentation/documentation/CoreFoundation/CGAffineTransform> to apply to the image.

The following code creates a filter that results in the image becoming tiled:

```swift
func affineTile(inputImage: CIImage) -> CIImage {
    let affineTileEffect = CIFilter.affineTile()
    affineTileEffect.inputImage = inputImage
    affineTileEffect.transform = CGAffineTransform(a: 1, b: 2, c: 2, d: 3, tx: 4, ty: 4)
    return affineTileEffect.outputImage!
}
```

![Two photographs. The photo on the left shows multiple sets of small purple flowers close up with good lighting, and the background has a slight blur. In the photograph on the right, an affine tile filter is applied, resulting in the flower image tiled to fill the extent of the image.](images/com.apple.coreimage/media-3624744@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)