我得到在Xcode中警告:presentModalViewController:動畫已被棄用
'presentModalViewController:animated:' is deprecated: first deprecated in iOS 6.0
在這行代碼:
[self presentModalViewController:initialSettingsVC animated:YES];
我試圖取代它成爲在documentation與建議:
[self presentModalViewController:initialSettingsVC animated:YES completion:nil];
我現在在XCode中出現錯誤:
爲 '視圖控制器' 不可見@interface聲明選擇 'presentModalViewController:動畫:完成:'
任何想法?
您有拼寫錯誤的方法。它是'presentViewController:animated:completion'。刪除'Modal'。 – bbarnhart
@bbarnhart你是對的。這是解決方案。 – poiuytrez