自动通知

// 调用set方法
[account setName:@"Savings"];

// 使用KVC forKey或forKeyPath
[account setValue:@"Savings" forKey:@"name"];
[document setValue:@"Savings" forKeyPath:@"account.name"];

// 使用 mutableArrayValueForKey: 检索关系代理对象
Transaction *newTransaction = <#Create a new transaction for the account#>;
NSMutableArray *transactions = [account mutableArrayValueForKey:@"transactions"];
[transactions addObject:newTransaction];
©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页