カメラAPIを使用して写真を撮ろうとしていますが、使用しようとすると
[self presentingViewController:picker animated: YES];
次のようなエラーが発生し続けます。
'MainViewController'の表示された@interfaceは、セレクター'presentingViewController:animated:'を宣言しません
そして、私はそれを修正する方法を理解できないようです。
カメラAPIを使用して写真を撮ろうとしていますが、使用しようとすると
[self presentingViewController:picker animated: YES];
次のようなエラーが発生し続けます。
'MainViewController'の表示された@interfaceは、セレクター'presentingViewController:animated:'を宣言しません
そして、私はそれを修正する方法を理解できないようです。
[self presentModalViewController: picker animated: YES]
(現在は非推奨)である必要があります
また[self presentViewController:picker animated:YES completion: NULL];
UIViewController
詳細については、クラスリファレンスを確認してください
@danielbeardが提案したようなものはありませんpresentingViewController: animated:
。presentModalViewController: animated:
presentingViewController
は、次のことを示す読み取り専用プロパティです。
「このViewControllerを表示したViewController。(読み取り専用)」ドキュメントから。