Function 関数

sel_getUid(_:)

Registers a method name with the Objective-C runtime system. メソッド名をObjective-C runtimeシステムに登録します。

Declaration 宣言

func sel_getUid(_ str: UnsafePointer<CChar>) -> Selector

Parameters パラメータ

str

A pointer to a C string. Pass the name of the method you wish to register. あるC文字列へのポインタ。あなたが登録したいメソッドの名前を渡してください。

Return Value 戻り値

A pointer of type SEL specifying the selector for the named method.

Discussion 解説

The implementation of this method is identical to the implementation of sel_registerName(_:).

Version-Notes バージョンに注意

Prior to OS X version 10.0, this method tried to find the selector mapped to the given name and returned NULL if the selector was not found. This was changed for safety, because it was observed that many of the callers of this function did not check the return value for NULL.

See Also 参照

Working with Selectors セレクタを扱う