我一直在为UIImagePickerController
控制器使用自定义叠加层,一切正常。我添加了按钮以通过 - 在前后摄像头之间切换 -
- (IBAction)changeCamera:(id)sender {
if (self.imagePicker.cameraDevice == UIImagePickerControllerCameraDeviceRear) {
self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
}
else {
self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceRear;
}
}
问题是,开关没有动画。我一直在使用基于 UIImagePicker 构建的苹果相机应用程序,并且切换正在发生动画。我该怎么做呢?