NSLog(@"After"); 2012-06-14 19:20:50.581 KVO[82636:403] Before 2012-06-14 19:20:50.583 KVO[82636:403] My name did change! 2012-06-14 19:20:50.584 KVO[82636:403] After
self.age = 20; NSLog(@"After"); 2012-06-14 19:20:50.096 KVO[10850:fd03] Before 2012-06-14 19:20:50.098 KVO[10850:fd03] My year of birth did change! 2012-06-14 19:20:50.099 KVO[10850:fd03] My age did change! 2012-06-14 19:20:50.100 KVO[10850:fd03] After
birth did change! 2012-06-14 19:20:50.590 KVO[82636:403] After KVO Case 2: Zmeníme rok narodenia NSLog(@"Before"); self.yearOfBirth = 1992; NSLog(@"After"); Ako na závislé hodnoty?
birth did change! 2012-06-14 19:20:50.590 KVO[82636:403] After KVO Case 2: Zmeníme rok narodenia NSLog(@"Before"); self.yearOfBirth = 1992; NSLog(@"After"); + (NSSet *)keyPathsForValuesAffectingAge { return [NSSet setWithObject:@"yearOfBirth"]; } Ako na závislé hodnoty?
19:20:50.590 KVO[82636:403] After KVO Case 2: Zmeníme rok narodenia NSLog(@"Before"); self.yearOfBirth = 1992; NSLog(@"After"); + (NSSet *)keyPathsForValuesAffectingAge { return [NSSet setWithObject:@"yearOfBirth"]; } 2012-06-14 19:20:50.581 KVO[82636:403] Before 2012-06-14 19:20:50.583 KVO[82636:403] My age did change! Ako na závislé hodnoty?