I feel that i don't fully understand difference between KVO and NSNotification... They seem to be so similar...
Could you make some example showing when is best to use one method and when the other ?
I don't speak about Bind and IB, but i mean add Observer programmatically in my code with NSNotificationCenter or KVO
[self.preferenceController addObserver:self
forKeyPath:@"color"
options:NSKeyValueObservingOptionOld
context:@"Color-change"
];
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…