使用自定义动画时iOS9 edgesForExtendedLayout忽略 [英] edgesForExtendedLayout ignored on iOS9 when using custom animation

查看:366
本文介绍了使用自定义动画时iOS9 edgesForExtendedLayout忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS9似乎忽略目标视图控制器的使用实现自定义动画时 edgesForExtendedLayout UIViewControllerAnimatedTransitioning ,因此下面的内容结束导航栏。任何想法,为什么发生这种情况?

iOS9 seems to ignore destination view controller's edgesForExtendedLayout when implementing custom animation using UIViewControllerAnimatedTransitioning, therefore the content ends up below the navigation bar. Any idea why this is happening?

我在主持 https://github.com/nmarkovic04/CustomAnimationTest 的一个例子。上运行它8.4和9.1显示了差异,但你可以最有可能尝试其他任何8.x和9.x中的版本。

I've hosted an example at https://github.com/nmarkovic04/CustomAnimationTest. Running it on 8.4 and 9.1 shows the difference but you can most likely try any other 8.x and 9.x version.

运行在X code 7,雨燕2.0​​。

Running on XCode 7, Swift 2.0.

屏幕截图

推荐答案

这在viewDidLoad中修复它,你可以确认PLS:]

this in ViewDidLoad fixes it can you confirm pls :]

self.edgesForExtendedLayout = .TOP
 self.extendedLayoutIncludesOpaqueBars = TRUE

这篇关于使用自定义动画时iOS9 edgesForExtendedLayout忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆