Search code examples
iosobjective-ciphonensarraynsset

How to get Class Name/Storage type of NSArray or NSSet?


I want to get the storage type of NSArray or NSSet.

For example I defined the property:

@property (nonatomic, retain) NSSet <TestClass > testComments;

Now I want to get name of class (TestClass) of NSSet. Please help me to achieve this.

Thanks.


Solution

  • It's not possible. Like Java, Objective-C's generics support is compile-time-only. They are little more than glorified annotations to help the Swift compiler, and the warnings generated by clang are really incidental.