Skip to content

Commit

Permalink
Merge pull request ibireme#103 from zqpmaster/master
Browse files Browse the repository at this point in the history
fix kvo bug
  • Loading branch information
ibireme committed Jan 28, 2016
2 parents 15a42e7 + 38a024f commit d5a09b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions YYKit/Base/Foundation/NSObject+YYAddForKVO.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ - (void)removeObserverBlocksForKeyPath:(NSString *)keyPath {
[arr enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop) {
[self removeObserver:obj forKeyPath:keyPath];
}];

[dic removeObjectForKey:keyPath];
}

- (void)removeObserverBlocks {
Expand All @@ -92,6 +94,8 @@ - (void)removeObserverBlocks {
[self removeObserver:obj forKeyPath:key];
}];
}];

[dic removeAllObjects];
}

- (NSMutableDictionary *)_yy_allNSObjectObserverBlocks {
Expand Down

0 comments on commit d5a09b6

Please sign in to comment.