iOS 8 +交互式过渡+导航栏显示=损坏? [英] iOS 8 + interactive transition + nav bar shown = broken?

查看:83
本文介绍了iOS 8 +交互式过渡+导航栏显示=损坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试在我们的应用中的两个视图之间添加交互式过渡。我们可以使其在iOS 7或iOS 8 上正常运行,而无需显示导航栏。但是,我们需要显示一个导航栏。为了演示我们遇到的一些问题,我创建了一个小的原型,其屏幕截图如下所示。我尝试了UIPercentDrivenInteractiveTransition,但发现了足够多的帖子声称它有我摆脱它的问题。



来源:消失(我们的主应用程序遇到的另一个问题)



自定义转换后无法识别的触摸



...但是它们仅在没有触摸时可用显示的导航栏



我们如何在iOS 8上使用导航栏使交互式过渡工作?

解决方案

我们最终放弃了使用UINavigationControllerDelegate方法,因为我们需要过渡的视图来涵盖标签栏。当我们转向模式全屏过渡方法时,此问题得以解决。


We're trying to add an interactive transition in our app between two views. We can make it work fine on iOS 7, or on iOS 8 without the navigation bar being shown. But, we need to have a navbar shown. To demonstrate (some of) the problems we're having, I created a small prototype which the screenshots show below. I tried UIPercentDrivenInteractiveTransition but found enough posts claiming that it has problems that I got rid of it.

Source: https://github.com/xaphod/TransitionBugger

Here is what it looks like on iOS 8, with a navigationController, but the nav bar is set NOT to show in the Storyboard: it works fine

Here's the exact same thing but with the nav bar shown. When there's a navbar, then somehow there are no touches received in the toViewcontroller after the transition completes (notice how the UIButton doesn't get a touch event):

And perhaps telling is that the navbar appears to be in a broken state. Watch what happens if I background the app and go back into it - the navbar state changes: the "Item" bar button changes to "Back" only once the app comes to foreground. Why is that happening?

I have read at least 12 posts on stackoverflow, objc.io, and elsewhere with lots of suggested solutions and tutorials etc. We have tried them all, including these threads:

"From View Controller" disappears using UIViewControllerContextTransitioning (another problem our main app is having)

Touches not recognized after custom transition

... but they only work when there is no navbar shown.

How can we make interactive transitions work with a navbar on iOS 8 ? All help much appreciated.

解决方案

We ended up moving away from using the UINavigationControllerDelegate approach, because we needed the transitioned view to cover the tab bar too. When we moved to the modal fullscreen transitioning approach, this problem was solved.

这篇关于iOS 8 +交互式过渡+导航栏显示=损坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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