conforms(to:)
Returns a Boolean value that indicates whether the receiver conforms to a given protocol.
Declaration
func conforms(to aProtocol: Protocol) -> BoolParameters
- aProtocol:
A protocol object that represents a particular protocol.
Return Value
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.