0
當我打開UIImagePickerController()
並設置showsCameraControls = false
時,相機預覽位於屏幕頂部。如何向下移動此預覽,以便與showCameraControls = true
的位置相同?如何翻譯UIImagePickerController預覽?
當我打開UIImagePickerController()
並設置showsCameraControls = false
時,相機預覽位於屏幕頂部。如何向下移動此預覽,以便與showCameraControls = true
的位置相同?如何翻譯UIImagePickerController預覽?
找到了答案,同時在線拖網:
// Create the UIImagePickerController without camera controls
var imagePicker: UIImagePickerController = UIImagePickerController()
imagePicker.delegate = self
imagePicker.sourceType = .Camera
imagePicker.allowsEditing = false
imagePicker.showsCameraControls = false
// Translate the camera preview down by 50px
let translate: CGAffineTransform = CGAffineTransformMakeTranslation(0.0, 50.0)
imagePicker.cameraViewTransform = translate
// Now add custom overlay
// ...