<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIGraphicsRenderer/rendererContextClass()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIGraphicsRenderer(cm)rendererContextClass"
  },
  "title" : "rendererContextClass()"
}
-->

# rendererContextClass()

Specifies the drawing context class used by this graphics renderer.

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

## Return Value

A subclass of [`UIGraphicsRendererContext`](/documentation/UIKit/UIGraphicsRendererContext) suitable for the current renderer.

## Discussion

Each subclass of `UIGraphicsRenderer` can define its own subclass of [`UIGraphicsRendererContext`](/documentation/UIKit/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.

---

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)