I had a property named myName
in my class, like:
@property (nonatomic, strong) NSString *myName;
I need to send a notification whe
Try this:
MyClass *var = [MyClass new];
[var addObserver:self forKeyPath:@"myName" options:NSKeyValueChangeOldKey context:nil];
and implement
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
}
this method will be called anytime when myName property changes