ios6到ios7的移植问题

来源:互联网 发布:ie11浏览器mac 编辑:程序博客网 时间:2024/06/08 23:39

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

原创粉丝点击