---
title: "isSubclass(of:)"
framework: objectivec
role: symbol
role_heading: Type Method
path: "objectivec/nsobject-swift.class/issubclass(of:)"
---

# isSubclass(of:)

Returns a Boolean value that indicates whether the receiving class is a subclass of, or identical to, a given class.

## Declaration

```swift
class func isSubclass(of aClass: AnyClass) -> Bool
```

## Parameters

- `aClass`: A class object.

## Return Value

Return Value YES if the receiving class is a subclass of—or identical to—aClass, otherwise NO.

## See Also

### Identifying Classes

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