Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [self addObserver:self forKeyPath:@"age" options:NSKeyValueObservingOptionNew context:nil];
- - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context{
- NSLog(@"keyPath->%@",keyPath);
- sleep(3);
- self.age = @"12312";
- NSLog(@"postEnd");
- keyPath->age
- //after 3 seconds
- postEnd
Add Comment
Please, Sign In to add comment