title: Capture photo by pressing beacon device click
body: <p>I am new to iOS development. I am working on an App where the user can open camera by clicking beacon device button. I also want to take a photo by clicking beacon device rather than camera default controls.
  How can I do with beacon device.here is code of open camera but cannot capture photo by pressing beacon device click</p>
  
  <pre><code>- (void)doublePressNotify:(NSNotification *)notification {
      CBPeripheral *peripheral = notification.object;
      AXATag *tag = [self findAXATag:peripheral.identifier.UUIDString];
      tag.pressType = @"double press";
      tag.beaconuuid = peripheral.identifier.UUIDString;
      NSLog(@"Shaheryar: %@", tag.beaconuuid);
      if([tag.beaconuuid  isEqual: @"B5F38CEB-C002-4A35-95BE-031F756131C4"]) {
  
          if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
  
              UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Device has no camera" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
              [myAlertView show];
  
          } else {
  
              UIImagePickerController *picker = [[UIImagePickerController alloc] init];
              picker.delegate = self;
              picker.allowsEditing = YES;
              picker.sourceType = UIImagePickerControllerSourceTypeCamera;
  
              [self presentViewController:picker animated:YES completion:NULL];
  
          }
  
      }
  }
  </code></pre>