Cannot call value of non-function type 'UIViewController?'とエラーが出ました。
Swift3の変更によるエラーみたいで
present(alert, animated: false, completion: nil) から
presentViewController(alert, animated: true, completion: nil) へ変えたらエラーが直った人が多いみたいなのですが、そもそも
presentedViewController(picker,animated:true,completion:nil)
のように書いたので何がおかしいのかわかりません。
どのように直せば良いのでしょうか?
全体にはこのように書きました。
//イメージピッカーのオープン func openPicker(sourceType:UIImagePickerControllerSourceType){ if !UIImagePickerController.isSourceTypeAvailable(sourceType){ showAlert(title: nil, text: "利用できません") return } //イメージピッカーの生成 let picker = UIImagePickerController() picker.sourceType = sourceType picker.delegate = self //ビューコントローラーのビューを開く presentedViewController(picker,animated:true,completion:nil) }

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/01/01 04:08