I'm writing an app which has a custom made view for taking photos with the Camera, similar to Apple's AVCam. In it, I want to make a button disappear and re-appear for the flash icon every time the camera is switched. IE When using the front camera, the flash button shouldn't be there and when using the back it should!
My code for this at the moment is:
AVCaptureDevicePosition position = [[videoInput device] position];
if (position == AVCaptureDevicePositionBack) {
self.flashButton.hidden == YES;
}
But it comes up with an error on the videoInput and I'm not sure why... Any documentation you could direct me to or ideas for changes in my code would be much appreciated!
EDIT
Just basically specifically why does it come up with the error of 'use of undeclared identifier' with this code:
AVCaptureDevicePosition position = [[videoInput device] position];