Setup:
ViewController holds an MyArray of objects from the PersonClass.
PersonClass has just two properties: name and age.
Problem:
When I want to read out a name property from the first object in MyArray whats the proper way to do this?
Do I have to temporarily create an instance of PersonClass like this?
PersonClass *tmp = [PersonClass alloc] init];
tmp = [MyArray objectAtIndex:0];
NSLog(@"%@", tmp.name);
Or can I refer directly to the properties of the objects in the MyArray?
Something like this:
NSLog(@"%@", [self.contactsArray objectAtIndex:0].name); // not working