Contents

objc_registerProtocol(_:)

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

Declaration

func objc_registerProtocol(_ proto: Protocol)

Parameters

  • proto:

    The protocol you want to register with the Objective-C runtime.

Discussion

When you create a new protocol using the objc_allocateProtocol(_:), you then register it with the Objective-C runtime by calling this function. After a protocol is successfully registered, it is immutable and ready to use.

See Also

Working with Protocols