// UIActionSheetDelegate event handlers
- (void) actionSheet:(UIActionSheet*)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
[self mainOptionClickedButtonAtIndex:buttonIndex];
}
- (void) mainOptionClickedButtonAtIndex:(NSInteger)buttonIndex
{
if (flashIx == buttonIndex)
{
BOOL newFlashMode = ![qUtils cameraTorchOn];
[qUtils cameraSetTorchMode:newFlashMode];
}
else if (selectTargetIx == buttonIndex)
{
selectedTarget = (selectedTarget + 1) % [qUtils.targetsList count];
DataSetItem *targetEntry = [qUtils.targetsList objectAtIndex:selectedTarget];
[qUtils activateDataSet:targetEntry.dataSet];
}
else if (autofocusContIx == buttonIndex)
{
// toggle camera continuous autofocus mode
BOOL newContAFMode = ![qUtils cameraContinuousAFOn];
[qUtils cameraSetContinuousAFMode:newContAFMode];
}
else if (autofocusSingleIx == buttonIndex)
{
[qUtils cameraPerformAF];
}
self.view.userInteractionEnabled = NO;
}