Function

objc_allocateProtocol(_:)

Creates a new protocol instance.

Declaration

func objc_allocateProtocol(_ name: UnsafePointer<Int8>!) -> Protocol!

Parameters

name

The name of the protocol you want to create.

Return Value

A new protocol instance or nil if a protocol with the same name as name already exists.

Discussion

You must register the returned protocol instance with the objc_registerProtocol(_:) function before you can use it.

There is no dispose method associated with this function.

See Also

Related Symbols

func objc_registerProtocol(Protocol!)

Registers a newly created protocol with the Objective-C runtime.