我試圖用相機API進行拍照,但是當我嘗試使用presentingViewController:動畫不能正常工作
[self presentingViewController:picker animated: YES];
我不斷收到一個錯誤說:
無可見@ 'MainViewController'的接口聲明選擇器'presentsViewController:animated:'
我似乎無法弄清楚如何解決它。
我試圖用相機API進行拍照,但是當我嘗試使用presentingViewController:動畫不能正常工作
[self presentingViewController:picker animated: YES];
我不斷收到一個錯誤說:
無可見@ 'MainViewController'的接口聲明選擇器'presentsViewController:animated:'
我似乎無法弄清楚如何解決它。
應該是[self presentModalViewController: picker animated: YES]
(廢棄)
或[self presentViewController:picker animated:YES completion: NULL];
有沒有像presentingViewController: animated:
它presentModalViewController: animated:
作爲@danielbeard建議。
presentingViewController
是告訴只讀財產約:「所呈現這個視圖控制器視圖控制器(只讀)」
這個問題似乎是題外話,因爲它太局部化了。 – rptwsthi
這個問題似乎是脫離主題,這是一個顯而易見的問題。 – Abizern