Hi I am developing IOS application in which I am using add observer with key value pair. But it's not working. I did following things:
[self.scrollView addObserver:self
forKeyPath:@"new"
options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld)
context:nil];
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
// inside here ...
}
But its not calling the above method. If I change forKeyPath
to contentOffset
then its working fine. But I want to change that value. Am I doing something wrong? Need Help. Thank you.