Iphone [self-presentModalViewController:作曲家动画:是];不赞成

Iphone [self-presentModalViewController:作曲家动画:是];不赞成,iphone,ios,objective-c,Iphone,Ios,Objective C,在iOS 6中不推荐使用 那么我应该用什么来代替这个代码呢 [self presentModalViewController:composer animated:YES]; 你会没事的。它的作用完全相同 有关不推荐使用的UIViewController方法的官方信息,请参见此处:查看presentModalViewController的文档:动画:。不推荐使用的方法的文档清楚地说明了应该使用什么来代替它 记住,医生是你的朋友 替换为presentViewController:已设置动画:

在iOS 6中不推荐使用

那么我应该用什么来代替这个代码呢

  [self presentModalViewController:composer animated:YES]; 
你会没事的。它的作用完全相同

有关不推荐使用的UIViewController方法的官方信息,请参见此处:

查看presentModalViewController的文档:动画:。不推荐使用的方法的文档清楚地说明了应该使用什么来代替它

记住,医生是你的朋友

替换为presentViewController:已设置动画:完成:

在iOS SDK中,UIViewController有两种方法:presentModalViewController:animated:和presentViewController:animated:completion:

上述两种说法的主要不同之处在于

presentViewController:动画:完成:在iOS 5或lattere中使用。 presentModalViewController:已设置动画:在iOS 5的早期版本中使用


另请参阅

您应该在iOS 6中使用情节提要。阅读以下内容:[自我呈现视图控制器:动画:完成:]@kschaeffler不需要使用故事板。
[self presentViewController:pNewController animated:YES completion:nil];
[self presentViewController:vc animated:NO completion:nil]; use this code for `iOS 6`