Key Value Coding vs accessor methods in iOS
问题 I'm trying to understand some theory part in Objective C related to KVC. Following is the example I've done. I'm having class call Cookie and it has a property like below @property NSString *name; Next, I have another class call Person and it has following property @property Cookie *cookie; Inside Person implementation file #import "Cookie.h" - (id)init { self = [super init]; if (self) { _cookie = [[Cookie alloc] init]; } return self; } In my ViewContrtoller I can write following two options