@IBAction func startCamera(_ sender: Any) { let sourceType:UIImagePickerController.SourceType = UIImagePickerController.SourceType.camera // カメラが利用可能かチェック if UIImagePickerController.isSourceTypeAvailable( UIImagePickerController.SourceType.camera){ // インスタンスの作成 let cameraPicker = UIImagePickerController() cameraPicker.modalPresentationStyle = UIModalPresentationStyle.popover cameraPicker.allowsEditing = true cameraPicker.sourceType = sourceType cameraPicker.delegate = self cameraPicker.showsCameraControls = true cameraPicker.setEditing(true, animated: true) self.present(cameraPicker, animated: true, completion: nil) } else{ print("error") } }
上記のコードで、ボタンを押したらカメラを起動させて、撮影後にトリミングをしたいのですが1枚目の画像のようになってしまい、トリミングの画面が表示されません。2枚目のような画面を表示するにはどのようにすれば良いのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/01/11 14:34