---
title: "init(ioSurface:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/cirenderdestination/init(iosurface:)-1hfcq"
---

# init(ioSurface:)

Creates a render destination based on an IOSurface object.

## Declaration

```swift
init(ioSurface surface: IOSurface)
```

## Parameters

- `surface`: The IOSurface render target.

## Return Value

Return Value A CIRenderDestination object for rendering to an IOSurface object.

## Discussion

Discussion The destination’s colorSpace property will default to a CGColorSpace created by querying the IOSurface object’s attributes.

## See Also

### Creating a Render Destination

- [init(pixelBuffer:)](coreimage/cirenderdestination/init(pixelbuffer:).md)
- [init(mtlTexture:commandBuffer:)](coreimage/cirenderdestination/init(mtltexture:commandbuffer:)-2iu5i.md)
- [init(width:height:pixelFormat:commandBuffer:mtlTextureProvider:)](coreimage/cirenderdestination/init(width:height:pixelformat:commandbuffer:mtltextureprovider:).md)
- [init(glTexture:target:width:height:)](coreimage/cirenderdestination/init(gltexture:target:width:height:)-9ci8e.md)
- [init(bitmapData:width:height:bytesPerRow:format:)](coreimage/cirenderdestination/init(bitmapdata:width:height:bytesperrow:format:).md)
