单击NavigationBar时,UIPopoverController不会被忽略 [英] UIPopoverController does not dismiss when clicking on the NavigationBar
问题描述
当点击rightBarButton时,会出现一个UIPopoverController。
When clicking on a rightBarButton, a UIPopoverController will present.
问题是:当点击NavigationBar时,这个UIPopoverController不会被解雇。
The problem is: when clicking on the NavigationBar, this UIPopoverController does not dismiss.
为什么?有没有办法解决它?
我试图搜索,但找不到任何相关信息。
Why? And is there a way to resolve it? I have tried to search, but can't find anything about this.
提前致谢。
推荐答案
UIPopoverController
似乎在显示时将导航栏添加到其 passthroughViews
数组中。我能够通过在呈现弹出窗口后立即将 passthroughViews
重新设置为空数组来解决问题。
UIPopoverController
seems to add the navigation bar to its passthroughViews
array when it is presented. I was able to solve the problem by re-setting passthroughViews
to an empty array immediately after presenting the popover.
这篇关于单击NavigationBar时,UIPopoverController不会被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!