---
title: "class(forType:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsimagerep/class(fortype:)"
---

# class(forType:)

Returns the image representation subclass that handles image data for the specified UTI.

## Declaration

```swift
class func `class`(forType type: String) -> AnyClass?
```

## Parameters

- `type`: The UTI string identifying the desired image type. Some sample image-related UTI strings include “public.image”, “public.jpeg”, and “public.tiff”. For a list of supported types, see UTCoreTypes.h.

## Return Value

Return Value A Class object for the image representation that can handle the UTI, or nil if no image representation could handle the data.

## See Also

### Managing Representation Subclasses of Images

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