---
title: rendererContextClass()
framework: uikit
role: symbol
role_heading: Type Method
path: uikit/uigraphicsrenderer/renderercontextclass()
---

# rendererContextClass()

Specifies the drawing context class used by this graphics renderer.

## Declaration

```swift
class func rendererContextClass() -> AnyClass
```

## Return Value

Return Value A subclass of UIGraphicsRendererContext suitable for the current renderer.

## Discussion

Discussion Each subclass of UIGraphicsRenderer can define its own subclass of UIGraphicsRendererContext. The graphics renderer calls this method whenever it needs to create a new graphics renderer context. Override this method to specify the context class that the graphics renderer should use.

## See Also

### Managing graphics contexts

- [context(with:)](uikit/uigraphicsrenderer/context(with:).md)
- [prepare(_:with:)](uikit/uigraphicsrenderer/prepare(_:with:).md)
