UIPopoverController 在“点击关闭”时关闭- 我如何检测此事件?
我在导航栏上使用 UIPopover。我有几个 UIBarButtonItems,弹出窗口从其中之一扩展。
当 popOver 被激活时,我将按钮的样式更改为 UIBarButtonItemStyleDone
。
然而,popOver 是通过按预期点击 UIPopoverController 来关闭的,但在此基础上我想将样式更改回 UIBarButtonItemStyleBordered。
有没有办法检测 UIPopOverController 是否正在关闭?因此,为了我自己的需要而搭载它?
I am using a UIPopover on my navigation bar. I have several UIBarButtonItems and the popover extends from one of these.
When the popOver is activated I changed the style of the button to UIBarButtonItemStyleDone
.
However, the popOver is dismissed by tapping off the UIPopoverController as expected, but upon this I want to change the style back to UIBarButtonItemStyleBordered
.
Is there a way I can detect if the UIPopOverController is closing? And therefore piggyback this for my own needs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实现
-popoverControllerDidDismissPopover:
UIPopoverControllerDelegate
中的方法你应该能够在那里做你需要做的事情。Implement the
-popoverControllerDidDismissPopover:
method in yourUIPopoverControllerDelegate
and you should be able to do what you need to do in there.