Function 関数

objc_allocateProtocol(_:)

Creates a new protocol instance. 新しいプロトコルインスタンスを作成します。

Declaration 宣言

func objc_allocateProtocol(_ name: UnsafePointer<CChar>) -> 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 参照

Working with Protocols プロトコルを扱う