Returns a specified protocol.
SDKs
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Objective-C Runtime
Declaration
func objc_getProtocol(_ name: Unsafe Pointer<Int8>) -> Protocol?
Parameters
name
The name of a protocol.
Return Value
The protocol named name
, or NULL
if no protocol named name
could be found.
Discussion
This function acquires the runtime lock.