[self presentModalViewController:composer animated:YES];
在iOS 6中[self presentModalViewController:composer animated:YES];已被弃用
不赞成这样做什么,我把这个代替代码
[self presentModalViewController:composer animated:YES];
在iOS 6中[self presentModalViewController:composer animated:YES];已被弃用
不赞成这样做什么,我把这个代替代码
使用
[self presentViewController:pNewController animated:YES completion:nil];
,你会被罚款。它完全一样。
有关弃用的UIViewController方法offcial信息,请浏览:http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/DeprecationAppendix/AppendixADeprecatedAPI.html
看的文档进行presentModalViewController:animated:
。已弃用方法的文档清楚地说明了您应该使用的地方。
请记住,文档是你的朋友。 :)
更换是presentViewController:animated:completion:
。
[self presentViewController:vc animated:NO completion:nil]; use this code for `iOS 6`
在iOS SDK
,有很的UIViewController
,presentModalViewController:animated:
和presentViewController:animated:completion:
两种方法。
在上述两种说法的主要不同的是,
presentViewController:animated:completion:
使用在iOS 5 or lattere.
presentModalViewController:animated:
使用较早iOS 5
你应该在的iOS 6使用故事板阅读:HTTP: //www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1 – kschaeffler 2013-02-23 15:00:47
'[self presentViewController:<#(UIViewController *)#> animated:<#(BOOL)#> completi on:<#^(void)completion#>];' – 2013-02-23 15:02:16
@kschaeffler无需使用故事板。 – Sulthan 2013-02-23 15:13:05