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万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章