---
title: "conforms(to:)"
framework: objectivec
role: symbol
role_heading: Instance Method
path: "objectivec/nsobjectprotocol/conforms(to:)"
---

# conforms(to:)

Returns a Boolean value that indicates whether the receiver conforms to a given protocol.

## Declaration

```swift
func conforms(to aProtocol: Protocol) -> Bool
```

## Parameters

- `aProtocol`: A protocol object that represents a particular protocol.

## Return Value

Return Value YES if the receiver conforms to aProtocol, otherwise NO.

## Discussion

Discussion This method works identically to the conforms(to:) class method declared in NSObject. It’s provided as a convenience so that you don’t need to get the class object to find out whether an instance can respond to a given set of messages.

## See Also

### Testing Object Inheritance, Behavior, and Conformance

- [isKind(of:)](objectivec/nsobjectprotocol/iskind(of:).md)
- [isMember(of:)](objectivec/nsobjectprotocol/ismember(of:).md)
- [responds(to:)](objectivec/nsobjectprotocol/responds(to:).md)
