NSNotification VS KVO?

KVO only works on values, NSNotification can be used for value changes but it can be used for anything and can carry a much greater payload.

Up vote 3 down vote favorite share g+ share fb share tw.

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" ; cocoa key-value-observing link|improve this question asked Jul 15 '11 at 13:36MatterGoal875420 89% accept rate.

KVO only works on values, NSNotification can be used for value changes but it can be used for anything and can carry a much greater payload. For example, you could have an NSNotification posted whenever a file has finished downloading and the userInfo could contain the length of time it took, the number of bytes downloaded and the filesystem path that the file has been saved to.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions