when to use "willChangeValueForKey" and "didChangeValueForKey"?
- by Frost Li
I saw these lines in a demo project, but I couldn't understand why it did that.
[self willChangeValueForKey:@"names"];
[self didChangeValueForKey:@"names"];
It called didChangeValueForKey immediately after willChangeeValueForKey.
Does it make any sense?
Furthermore, when should be the right time to call this two methods?
Thanks a lot!! :)