title: How to add observer on a UISlider
body: <p>Any idea how can i add my controller class as a observer for my View class' slider?</p>
  
  <p>I am trying to achieve this via Observer way: Inside my controller's viewDidLoad method I am calling </p>
  
  <pre><code>[self addObserver:myView forKeyPath:@"myView.mySlider.value" options:NSKeyValueObservingOptionNew context:NULL];
  </code></pre>
  
  <p>and in the same controller file i am implementing:</p>
  
  <pre><code>- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { 
      if ([keyPath isEqualToString:@"myView.mySlider.value"]) {
          myView.myImgView.animationDuration = [[change valueForKey:NSKeyValueObservingOptionNew] intValue]; 
      } 
  } 
  </code></pre>
  
  <p>But my app is crashing. Please help</p>