title: Best practices for context parameter in addObserver (KVO)
body: <p>I was wondering what you should set the Context pointer in KVO when you are observing a property.  I'm just starting to use KVO and I haven't gleaned too much from the documentation.  I see on this page: <a href="http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/" rel="noreferrer">http://www.jakeri.net/2009/12/custom-callout-bubble-in-mkmapview-final-solution/</a> the author does this:</p>
  
  <pre><code>[annView addObserver:self
  forKeyPath:@"selected"
  options:NSKeyValueObservingOptionNew
  context:GMAP_ANNOTATION_SELECTED];
  </code></pre>
  
  <p>And then in the callback, does this:</p>
  
  <pre><code>- (void)observeValueForKeyPath:(NSString *)keyPath
  ofObject:(id)object
  change:(NSDictionary *)change
  context:(void *)context{
  
  NSString *action = (NSString*)context;
  
  
  if([action isEqualToString:GMAP_ANNOTATION_SELECTED]){
  </code></pre>
  
  <p>I'm assuming in this scenario, the author just creates a string to be identified later in the callback.  </p>
  
  <p>Then in iOS 5 Pushing the Limits book, I see he does this:</p>
  
  <pre><code>[self.target addObserf:self forKeyPath:self.property options:0 context:(__bridge void *)self];
  </code></pre>
  
  <p>callback: </p>
  
  <pre><code>if ((__bridge id)context == self) {
  }
  else {
     [super observeValueForKeyPath .......];
  }
  </code></pre>
  
  <p>I was wondering if there is a standard or best practices to pass into the context pointer? </p>