I thought home-cooked @property setters were supposed to look like this:
-(void) setFoo:(Foo *)newFoo {
// Safeguards
// ...
[self willChangeValueForKey:@"foo"];
// Switcheroo
// ...
[self didChangeValueForKey:@"foo"];
}
But I see a lot of code in blog posts by people who've been doing Cocoa a lot longer than I have, where it's like this:
-(void) setFoo(Foo *)newFoo {
// Safeguards
// ...
// Switcheroo
// ...
}
So my question is, do we need to call the KVO-notification methods? Or is it being done magically when you update the private iVar, if you're using the modern runtime?