Check if object is Class type

后端 未结 5 1902

I have a method that receives a NSArray of Class objects and I need to check if they all are Class type generated with the code bellow

5条回答
  •  攒了一身酷
    2020-12-02 10:26

    Update: In iOS 8+ or OS X 10.10+, you can just do:

    object_isClass(obj)
    

    (You will need to #import .)

提交回复
热议问题