如何关闭 AirPrint 弹出框?
我有一个单例弹出窗口,因此我一次只显示一个弹出窗口。当我执行共享弹出窗口并选择 AirPrint 时,共享弹出窗口会正确消失,并在其位置显示 AirPrint 弹出窗口。
但如果我再次按下共享按钮,共享弹出窗口将显示在 AirPrint 弹出窗口的顶部。
我找不到引用 AirPrint 弹出窗口来将其关闭的方法。
一些进一步的信息 - 我在屏幕底部的工具栏上有 UIBarButtonItems,并且在屏幕顶部的导航栏的 rightBarButtonItem 中嵌套了四个 UIBarButtonItems。
屏幕底部的 UIBarButtonItems 正确地自动关闭 AirPrint 弹出框,但顶部的嵌套按钮则不会。
但如果我知道 AirPrint 弹出窗口的名称,我就可以从顶部按钮的代码中将其忽略。
I have a singleton popover, so that I only show one popover at a time. When I do my share popover, and choose AirPrint, the share popover correctly goes away, showing the AirPrint popover in its place.
But if I press the share button again, the share popover displays on top of the AirPrint popover.
I can't find a way of referencing the AirPrint popover to dismiss it.
Some further information - I have UIBarButtonItems on a toolbar at the bottom of the screen, and four UIBarButtonItems nested inside a navigationBar's rightBarButtonItem at the top of the screen.
The UIBarButtonItems at the bottom of the screen correctly dismiss the AirPrint popover automatically, but the nested ones at the top do not.
But if I knew the name of the AirPrint popover, I could dismiss it from the top buttons' code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法使用实际的“AirPrint”
UIPopoverController
。但是,如果您需要以编程方式使其消失,您可以:The actual "AirPrint"
UIPopoverController
is not available to you. However, if you need to make it go away programmatically, you do:您应该能够像下面的代码一样关闭打印机弹出窗口视图。
You should be able to dismiss Printer popover view as below code.