title: UIImagePickerController how to do animated switch from rear to front camera?
body: <p>I have been using custom overlay for <code>UIImagePickerController</code> controller, and everything is working fine. I have added button to switch between front and rear camera via - </p>
  
  <pre><code> - (IBAction)changeCamera:(id)sender {
  if (self.imagePicker.cameraDevice == UIImagePickerControllerCameraDeviceRear) {
      self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
  }
  else {
      self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
  }
  }
  </code></pre>
  
  <p>Problem is, switch is not animated. I have been using apple camera app which is built on top of UIImagePicker, and the switch is happening animated. How do I do this?</p>