title: Use of undeclared identifier 'startCameraControllerFromViewController'
body: <p>I have a button that opens the camera application so the user can save it as a UIImage. I get a use of undeclared identifier error and I don't know why. Any help would be appreciated.    </p>
  
  <pre><code>#pragma mark - Camera Button
  
  - (IBAction)cameraButton:(id)sender {
      [self startCameraControllerFromViewController:self usingDelegate:self];
  }
  
  
  #pragma mark - Save picture callbacks
  
  - (void) image:(UIImage *) image didFinishSavingWithError:(NSError *)error contextInfo:(void *) contextInfo {
      if(error) {
  
  
  
  #pragma mark - Get picture by taking picture
  
  - (BOOL) startCameraControllerFromViewController: (UIViewController*) controller usingDelegate: (id &lt;UIImagePickerControllerDelegate, UINavigationControllerDelegate&gt;) delegate {
      if (([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera] == NO) || (delegate == nil) || (controller == nil))
          return NO;
  
      UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
      cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;
  
      cameraUI.delegate = delegate;
      [controller presentViewController:cameraUI animated:YES completion:nil];
      return YES;
  }
  
  - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
      UIImage * image = info[UIImagePickerControllerOriginalImage];
      _label.text = [NSString stringWithFormat:@"Have image: %d x %d", (int) image.size.width, (int) image.size.height];
      _imageView.image = image;
      [self dismissViewControllerAnimated:YES completion:nil];
  }
  
  - (void) imagePickerControllerDidCancel:(UIImagePickerController *)picker {
      [self dismissViewControllerAnimated:YES completion:nil];
  }
  
      }
  }
  
  @end
  </code></pre>