How to detect a property return type in Objective-C

后端 未结 6 1745
南旧
南旧 2020-12-05 11:10

I have an object in objective-c at runtime, from which I only know the KVC key and I need to detect the return value type (e.g. I need to know if its an NSArray or NSMutable

6条回答
  •  一向
    一向 (楼主)
    2020-12-05 11:33

    Cheap answer: use the NSObject+Properties source here.

    It implements the same methodology described above.

提交回复
热议问题