In NSManagedObject Sub Class, I have code ...
- (void) awakeFromInsert {
[self addObserver:[NSApp delegate] forKeyPath:@"name" options:NSKeyValueObservingOptionNew context:nil];
}
What adds my App Delegate as an observer, what I want to do now, from within my App Delegate, I want to remove myself as an observer for my NSManagedObject Sub Class.
How should I do it? Thank.
I was thinking of adding this to my App Delegate.
[JGManagedObject removeObserver:self forKeyPath:@"name"];
but, unfortunately, is removeObserver:forKeyPath:not a class method.
source
share