Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Objective-C ランタイム ライブラリを使用して、オブジェクトがクラスのインスタンスではなくクラス オブジェクトであるかどうかを確認するにはどうすればよいでしょうか?
私が知っている最も簡単な確実な方法はclass_isMetaClass(object_getClass(yourObject)). (これは、クラスが常にメタクラスのインスタンスであるため機能します。)
class_isMetaClass(object_getClass(yourObject))