如何通过操纵快门按钮
了解iPhone有自动设置定时拍照功能,自动拍摄照片。之后按下快门按钮启动。如何通过操纵快门按钮
我想要做类似的事情。所以如何在相机启动后以编程方式处理快门按钮。
- implement: UINavigationControllerDelegate, UIImagePickerControllerDelegate class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate {
var imagePicker: UIImagePickerController!
}
//-- launch the camera
@IBAction func takePhoto(_ sender: UIButton) {
imagePicker = UIImagePickerController()
imagePicker.delegate = self
imagePicker.sourceType = .camera
present(imagePicker, animated: true, completion: nil)
}
所以,相机推出后,如何通过编程处理的快门按钮类似点击它来拍照?
回答:
因此,相机启动后,如何以编程方式处理快门按钮,如点击它来拍照?
告诉UIImagePickerController到takePicture
。
以上是 如何通过操纵快门按钮 的全部内容, 来源链接: utcz.com/qa/260640.html