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
No problem here is how you do it:
if([NSStringFromClass([obj class]) isEqualToString:@"Class"]){
NSLog(@"It is type of Class");
}
Edit
Or you can make your Class conform to a protocol: and check if obj that you get from the array conforms to this protocol like this:
if([obj conformsToProtocol:@protocol(MyClassProtocol)])
Edit
Or you can check if what you get from the array is an NSObject complient
if ([object conformsToProtocol:@protocol(NSObject)]) {
// Do something
}