当选择另一个对象时是否有可能关闭弹出窗口控制器?
我得到了一个 MapView,在其中通过推送 UIPopover 控制器编辑了注释的标注,并在其中添加了一些表格视图。 我想实现不必单击,以便当我在地图上选择另一个注释时,我的弹出窗口控制器会消失。是否有可能在不单击的情况下在后台启用这些对象?
有什么想法或建议来解决这个问题吗?
I got a MapView on which I edited the callout of my annotations through pushing a UIPopover Controller, on which i added some table views..
I would like to achive that I don't have to click so that my popover controller dismisses when I e.g. select another annotation on the map.. Are there any possibilities to enable these objects in background without clicking?
Any ideas or suggestions to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 UIPopoverController 被认为是模态的,因此默认行为是您所描述的行为:您必须首先关闭弹出窗口,然后才能与它下面的视图进行交互。
但是,您可以通过分配其
passthroughViews
属性来与弹出窗口下的视图进行交互:UIPopoverController 类参考:
这样,您应该能够在弹出窗口显示时与 MapView 进行交互。
当您通过调用
dismissPopoverAnimated:
选择另一个注释时,您可以关闭当前显示的弹出窗口Since a UIPopoverController is considered modal, the default behaviour is the one you described: you must first close the popover before interacting with the view under it.
You can, however, interact with views under the popover by assigning its
passthroughViews
property:UIPopoverController Class Reference:
That way, you should be able to interact with your MapView while the popover is showing.
You can dismiss the currently showing popover when you select another annotation by calling
dismissPopoverAnimated: