<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImageRep/registerClass(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSImageRep(cm)registerImageRepClass:"
  },
  "title" : "registerClass(_:)"
}
-->

# registerClass(_:)

Adds the specified class to the registry of available image representation subclasses.

```
class func registerClass(_ imageRepClass: AnyClass)
```

## Parameters

`imageRepClass`

The `Class` object for an `NSImageRep` subclass.

## Discussion

This method posts an [`registryDidChangeNotification`](/documentation/AppKit/NSImageRep/registryDidChangeNotification), along with the receiving object, to the default notification center.

A good place to add image representation classes to the registry is in the `load` class method.

## See Also

  <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/load()>



---

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)