iOS6 之后
presentModalViewController 实效,过期了
Presents a modal view managed by the given view controller to the user. (Deprecated in iOS 6.0. UsepresentViewController:animated:completion: instead.)
Parameters
- viewControllerToPresent
-
The view controller being presented.
flag
-
Pass
YESto animate the presentation; otherwise, passNO.
completion
-
A completion handler or
NULL.
苹果支持最新的api,在iOS 5中推出来的,并且之前的设置
dismissModalViewControllerAnimated:
也过期了,替代的是Dismisses the view controller that was presented by the receiver. (Deprecated in iOS 6.0. UsedismissViewControllerAnimated:completion: instead.)
Parameters
- flag
-
Pass
YESto animate the transition.
completion
-
A block called after the view controller has been dismissed.
不过在这些测试当中,也就是在iOS 5之前,一直可以使用的[[self parentViewController] dismissModalViewControllerAnimated:YES];
这里面也不能使用了,是在iOS 5之后修改的。
取而代之的写法是[self dismissModalViewControllerAnimated:YES];
中间一直没用,发现奇怪了,怎么实效了按钮,这才明白,总值iOS 6的到来,改变了很多api的使用
而且xcode 4.5 的时候,在ib 里面 use autolayout 这个选项针对的就是iPhone 5大屏幕的出现,
在后乔布什时代,这个布局很头痛,IB和代码的界面 的确不好控制。
希望在正式颁布,中修改好。
本文讨论了iOS6中废弃的presentModalViewController及dismissModalViewControllerAnimated方法,介绍了替代API:presentViewController:animated:completion:与dismissViewControllerAnimated:completion:。同时提及了iOS6带来的其他变化,如Auto Layout在Xcode 4.5中的应用。
1784

被折叠的 条评论
为什么被折叠?



