问题描述
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?
我在主持的一个例子。上运行它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忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!