---
title: "registerClass(_:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsimagerep/registerclass(_:)"
---

# registerClass(_:)

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

## Declaration

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

## Parameters

- `imageRepClass`: The Class object for an NSImageRep subclass.

## Discussion

Discussion This method posts an 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

### Related Documentation

- [load()](objectivec/nsobject-swift.class/load().md)

### Managing Representation Subclasses of Images

- [class(forType:)](appkit/nsimagerep/class(fortype:).md)
- [class(for:)](appkit/nsimagerep/class(for:).md)
- [registeredClasses](appkit/nsimagerep/registeredclasses.md)
- [unregisterClass(_:)](appkit/nsimagerep/unregisterclass(_:).md)
- [class(forFileType:)](appkit/nsimagerep/class(forfiletype:).md)
- [class(forPasteboardType:)](appkit/nsimagerep/class(forpasteboardtype:).md)
