protocol_copyPropertyList(_:_:)
Returns an array of the properties declared by a protocol.
Declaration
func protocol_copyPropertyList(_ proto: Protocol, _ outCount: UnsafeMutablePointer<UInt32>?) -> UnsafeMutablePointer<objc_property_t>?Parameters
- proto:
A protocol.
- outCount:
Upon return, contains the number of elements in the returned array.
Return Value
A C array of pointers of type objc_property_t describing the properties declared by proto. Any properties declared by other protocols adopted by this protocol are not included. The array contains *outCount pointers followed by a NULL terminator. You must free the array with free().
Discussion
If the protocol declares no properties, NULL is returned and *outCount is 0.
See Also
Working with Protocols
objc_getProtocol(_:)objc_copyProtocolList(_:)objc_allocateProtocol(_:)objc_registerProtocol(_:)protocol_addMethodDescription(_:_:_:_:_:)protocol_addProtocol(_:_:)protocol_addProperty(_:_:_:_:_:_:)protocol_getName(_:)protocol_isEqual(_:_:)protocol_copyMethodDescriptionList(_:_:_:_:)protocol_getMethodDescription(_:_:_:_:)protocol_getProperty(_:_:_:_:)protocol_copyProtocolList(_:_:)protocol_conformsToProtocol(_:_:)