samedi 25 avril 2015

Objective-C: Why is my object being instantiated as __NSMallocBlock__?


I am running into a strange problem where I am trying to dynamically create a new instance of a Class property (arrayClass) that I have set and stored previously:

NSObject *instance = [[self.arrayClass alloc] init];
if ( ![instance isKindOfClass:self.arrayClass] )
    NSLog(@"Say what?!");

If I break and log self.arrayClass, it shows the proper class on the console (in this case, called Store), but when I attempt to create an instance of it dynamically and log the type of the instance, it is showing its class as __NSMallocBlock__.

What the heck is going on??


Aucun commentaire:

Enregistrer un commentaire