NSMutableArray *arr = [NSMutableArray arrayWithCapacity:3];
if ([arr isMemberOfClass:[NSMutableArray class]]) {
NSLog(@"YEP!!");
} else {
NSLog(@"NO!!");
}
I get always "NO!!" in console. I tried with Array, NSNumber, NSString. All of them don't seem to work. That's strange. As I get it from the docs, this method should return YES if I test agains the class of the object which is subject of the testing. I'm using the Foundation.h, not Core Foundation (if it makes any difference anyways).