今天下午偶然翻出之前的ipad程序,發現項目中的ios6中的許多類已經不再能使用,需要進行ios7的移植,同事報出很多警告,特發此文記錄。
下發的文章暴錯如下:
presentModalViewController deprecated in ios6
在ios6 中presentModalViewController 方法已經不使用了,所以出現warning
product ->Build For -> Profiling 編譯出現大量的warning。
presentModalViewController:animated: is deprecated :first deprecated in iOS6.0 。
[self presentModalViewController:pNewController animated:YES];
替換爲
[self presentViewController:pNewController animated:YES completion:nil];
相對應的
dismissModalViewControllerAnimated :animated: is deprecated :first deprecated in iOS6.0
[self dismissModalViewControllerAnimated:YES];
替換爲
[self dismissViewControllerAnimated:YES completion:nil];
以上解決爲其他博友發表,此爲轉載記錄,原文地址:http://blog.csdn.net/sandy_kisa/article/details/8638642