title: Undeclared Identifier after the void
body: <p>I have got this error on the line where the void is it says undeclared identifier for sliderDidChange can some one please help me with this i can;t find any answers.</p>
  
  <p>h. file</p>
  
  <pre><code>//
  //  LightViewController.h
  //  Flash Light
  //
  //  Created by John Whitney on 12-07-27.
  //  Copyright (c) 2012 Perfect Programs. All rights reserved.
  //
  #import &lt;UIKit/UIKit.h&gt;
  #import &lt;AVFoundation/AVFoundation.h&gt;
  
  @interface LightViewController : UIViewController {
  IBOutlet UISlider *slider;
  IBOutlet UISlider *theslider;
  IBOutlet UISlider *customslider;
  UIButton *onButton;
  UIButton *offButton;
  UIImageView *onView;
  UIImageView *offView;
  }
  
  @property(nonatomic, strong) IBOutlet UIButton *onButton;
  @property(nonatomic, strong) IBOutlet UIButton *offButton;
  @property(nonatomic, strong) IBOutlet UIImageView *onView;
  @property(nonatomic, strong) IBOutlet UIImageView *offView;
  @property(nonatomic, readonly) float torchLevel;
  
  -(void)sliderDidChange:(UISlider *)slider;
  -(BOOL)setTorchModeOnWithLevel:(float)torchLevel error:(NSError **)outError;
  -(BOOL)supportsAVCaptureSessionPreset:(NSString *)preset;
  -(IBAction)torchOn:(id)sender;
  -(IBAction)torchOff:(id)sender;
  @end
  </code></pre>
  
  <p>m.file</p>
  
  <pre><code>UISlider *localslider = [[UISlider alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 40.0f)];
  localslider.maximumValue = 1.0f;
  localslider.minimumValue = 0.0f;
  [localslider setContinuous:YES];
  [localslider addTarget:self action:@selector(sliderDidChange:)  forControlEvents:UIControlEventValueChanged];
  [self.view addSubview:localslider];
  
  
  -(void)sliderDidChange:(UISlider *)slider
  {
  
  AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
  [device lockForConfiguration:nil];
  [device setTorchModeOnWithLevel:slider.value error:NULL];
  [device unlockForConfiguration];
  }
  </code></pre>
  
  <p>can someone please help quick</p>