开发者

What's -mutableSetValueForKey: returning, actually? Is that something special?

开发者 https://www.devze.com 2023-01-03 07:44 出处:网络
From the docs: Y开发者_StackOverflow中文版ou usually access to-many relationships using mutableSetValueForKey:, which returns

From the docs:

Y开发者_StackOverflow中文版ou usually access to-many relationships using mutableSetValueForKey:, which returns a proxy object that both mutates the relationship and sends appropriate key-value observing notifications for you.

So this returns an "intelligent" NSMutableSet which automatically lets the context delete objects when they get deleted from the set, and reverse? Is that a proxy object?


Yes. See Accessor Search Pattern for Unordered Collections in the Key-Value programming guide for details.

0

精彩评论

暂无评论...
验证码 换一张
取 消