ios6到ios7的移植問題

今天下午偶然翻出之前的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

發佈了20 篇原創文章 · 獲贊 0 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章