Skip to content

Commit

Permalink
Add removeObserver:forKeyPath:context: to implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasa committed Sep 13, 2023
1 parent dbebf76 commit 2c81d3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Headers/Foundation/NSKeyValueObserving.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ GS_EXPORT NSString *const NSKeyValueChangeNotificationIsPriorKey;
- (void) removeObserver: (NSObject*)anObserver
forKeyPath: (NSString*)aPath;

- (void) removeObserver: (NSObject*)anObserver
forKeyPath: (NSString*)aPath
context: (void*)context;

@end

@interface NSArray (NSKeyValueObserverRegistration)
Expand Down
6 changes: 6 additions & 0 deletions Source/NSKeyValueObserving.m
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,12 @@ - (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath
[forwarder finalize];
}


- (void) removeObserver: (NSObject*)anObserver forKeyPath: (NSString*)aPath context: (void*)context
{
[self removeObserver: anObserver forKeyPath: aPath];
}

@end

/**
Expand Down

0 comments on commit 2c81d3e

Please sign in to comment.