问题描述
我有一个问题,我坚持,但我不知道为什么它会发生;如果我在堆栈上推送一个细节控制器,并使用默认左边缘 interactivePopGestureRecognizer
快速向后滑动,我的父/根视图控制器的 UINavigationBar
看起来很腐败或类似东西,几乎就像内置的iOS转换机制没有时间在细节视图消失后重置它的工作。另外要澄清的是,这个'腐败' UINavigationBar
中的所有内容仍然是可触摸的,我父/根视图控制器上的所有内容都能正常运行。
I have an issue that I'm stuck on, but I have no idea why it even happens; If I push a detail controller on the stack, and I swipe back very quickly using the default left edge interactivePopGestureRecognizer
, my parent/root view controller's UINavigationBar
looks corrupt or something, almost like the built in iOS transition mechanism didn't have time to do it's job at resetting it after the detail view is gone. Also to clarify, everything in this 'corrupt' UINavigationBar
is still touchable and everything on my parent/root view controller works perfectly.
由于没有源代码而导致人们失败:没有源代码!这是一个Apple bug!
无论如何要将此 UINavigationBar
重置为它应该是什么什么时候调用父/根视图控制器的viewDidAppear方法?
Is there anyway to reset this UINavigationBar
to what it should be when the parent/root view controller's viewDidAppear method gets called?
请注意,如果我点击左上方的后退按钮而不是使用左边缘<$ p,则不会发生此错误 interactivePopGestureRecognizer
。
Note that this bug does not occur if I tap the top left back button instead of using the left edge interactivePopGestureRecognizer
.
编辑:我添加了一个NSLog来检查父/根视图控制器上viewDidAppear上的navigationBar的子视图计数,并且计数总是相同的,腐败与否,所以我想知道为什么弹出的控制器会对我的 UINavigationBar
造成严重破坏。
I added an NSLog to check the navigationBar's subview count on viewDidAppear on the parent/root view controller, and the count is always the same, corrupt or not, so I'd like to know why the popped controller is wreaking havoc with my UINavigationBar
.
如果你可以帮助我,我会非常感激!谢谢。
If you can help me at all, I'd greatly appreciate it! Thank you.
我附上了它的样子截图:注意后面的雪佛龙不是我的父/根视图控制器的一部分,它是什么从堆栈弹出。 Testing123是父/根视图控制器的标题,而不是从堆栈弹出的标题。头部和齿轮图标是父/根视图控制器的一部分。
I've attached a screenshot of what it looks like: Note that the back chevron isn't part of my parent/root view controller, it's part of what was popped off the stack. Testing123 is the title for the parent/root view controller and not that of what was popped off the stack. The head and gear icons are part of the parent/root view controller.
这篇关于使用默认的interactivePopGestureRecognizer快速向后滑动时,iOS 7损坏了UINavigationBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!