title: Switch front/back camera with AVCaptureSession
body: <p>I'm following the only answer this has on SO -</p>
  
  <p><a href="https://stackoverflow.com/questions/20864372/switch-cameras-with-avcapturesession">Switch cameras with avcapturesession</a></p>
  
  <p>However cameraWithPosition does not seem to work. Deprecated?</p>
  
  <pre><code>//Get new input
      AVCaptureDevice *newCamera = nil;
      if(((AVCaptureDeviceInput*)currentCameraInput).device.position == AVCaptureDevicePositionBack)
      {
          newCamera = [self cameraWithPosition:AVCaptureDevicePositionFront];
      }
      else
      {
          newCamera = [self cameraWithPosition:AVCaptureDevicePositionBack];
      }
  </code></pre>