aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMNSObject+KeyValueObserving.h
diff options
context:
space:
mode:
Diffstat (limited to 'Foundation/GTMNSObject+KeyValueObserving.h')
-rw-r--r--Foundation/GTMNSObject+KeyValueObserving.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Foundation/GTMNSObject+KeyValueObserving.h b/Foundation/GTMNSObject+KeyValueObserving.h
index de11aeb..079717f 100644
--- a/Foundation/GTMNSObject+KeyValueObserving.h
+++ b/Foundation/GTMNSObject+KeyValueObserving.h
@@ -32,6 +32,12 @@
#import <Foundation/Foundation.h>
+#ifndef GTM_PERFORM_KVO_CHECKS
+// Controls whether KVO checking code is on in debug. See
+// GTMNSObject+KeyValueObserving.m for details
+#define GTM_PERFORM_KVO_CHECKS 1
+#endif
+
// If you read the articles above you will see that doing KVO correctly
// is actually pretty tricky, and that Apple's documentation may not be
// completely clear as to how things should be used. Use the methods below
@@ -51,6 +57,10 @@
- (void)gtm_removeObserver:(id)observer
forKeyPath:(NSString *)keyPath
selector:(SEL)selector;
+
+// Use this to have |self| stop observing all keypaths on all objects.
+- (void)gtm_stopObservingAllKeyPaths;
+
@end
// This is the class that is sent to your notification selector as an