title: Set slider value
body: <p>i try to set a value to a slider after a button click,
  but it does not work - the slider does not move. the code runs fine without mistakes.</p>
  
  <p>It should be pretty simple but I can't figure it out.
  xCode Version 4.5.2</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p>here my code:</p>
  
  <p>ViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface ViewController : UIViewController
  @property (weak, nonatomic) IBOutlet UILabel *debugLabel;
  @property (weak, nonatomic) IBOutlet UISlider *slider;
  
  - (IBAction)slider:(id)sender;
  - (IBAction)ButtonChangeValue:(id)sender;
  
  @end
  </code></pre>
  
  <p>ViewController.m</p>
  
  <pre><code>#import "ViewController.h"
  @interface ViewController ()
  @end
  
  @implementation ViewController
  @synthesize slider;
  
  ...
  
  - (IBAction)slider:(UISlider *)sender {
      float value = [sender value];
      self.debugLabel.text = [NSString stringWithFormat:@"Value: %f",value];
  }
  
  - (IBAction)ButtonChangeValue:(id)sender {
      slider.value = 90;
  }
  </code></pre>