实效API

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 YES to animate the presentation; otherwise, pass NO.

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 YES to 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和代码的界面 的确不好控制。

希望在正式颁布,中修改好。

猜你喜欢

转载自rbbtsn0w.iteye.com/blog/1616903
今日推荐