---
title: "filter(withName:)"
framework: Core Image
role: symbol
role_heading: Instance Method
platforms: [iOS 5.0+, iPadOS 5.0+, Mac Catalyst 13.1+, macOS 10.4+, visionOS 1.0+]
path: "coreimage/cifilterconstructor/filter(withname:)"
---

# filter(withName:)

Returns a filter object specified by name.

## Declaration

```swift
func filter(withName name: String) -> CIFilter?
```

## Parameters

- `name`: The name of the requested custom filter.

## Return Value

Return Value A CIFilter object implementing the custom filter.

## Discussion

Discussion Core Image calls this method when a filter is requested by name using the CIFilter class method init(name:) method (or related methods). Your implementation of this method should provide a new instance of the CIFilter subclass for your custom filter.

## See Also

### Related Documentation

- [Core Image Programming Guide](apple-archive/documentation/GraphicsImaging/Conceptual/CoreImaging/ci_intro.md)
