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
If you need to verify if the object in the array is a Class object then you can verify if it responds to class methods.
for ( id obj in arr ) {
if (([obj respondsToSelector:@selector(isSubclassOfClass:)])
&& (obj == [NSObject class]) ) {
NSLog(@"%@", obj);
}
}
Once you know it is a Class object by verifying if it responds to isSubclassOfClass: then you can check for direct equality with [NSObject class].