title: Best practice to remove an object as observer for some KVO property
body: <p>I wanted to know what are the best practices for adding and removing self as observer for some KVO property. I have added my controller object as observer for "hidden" property of a UIView. I added the observer in loadView of my view controller. Now, what is the best place to DE-register as observer for this property. I want to stop observing as soon as the view controller's view is dismissed. At times I am seeing below console warnings and at times I am crashing due to over removal as observer.</p>
  
  <p>Any suggestions?</p>
  
  <pre><code>An instance 0x190659e0 of class UIView was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
  </code></pre>