I just watched a Stanford lecture on the iPhone since January 2010, and I noticed that the guy from Apple continues to refer to getting the class name of the objects using "className", for example.
NSArray *myArray = [NSArray arrayWithObjects:@"ONE", @"TWO", nil];
NSLog(@"I am an %@ and have %d items", [myArray className], [myArray count]);
However, I cannot get this to work, the closest I can come up with it is to use the class, is it wrong for className to delete it, just curious?
NSArray *myArray = [NSArray arrayWithObjects:@"ONE", @"TWO", nil];
NSLog(@"I am an %@ and have %d items", [myArray class], [myArray count]);
Gary
source
share