UIPopoverController 在“点击关闭”时关闭- 我如何检测此事件?

发布于 2024-11-13 22:48:58 字数 291 浏览 7 评论 0原文

我在导航栏上使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野味少女 2024-11-20 22:48:58

实现 -popoverControllerDidDismissPopover: UIPopoverControllerDelegate 中的方法你应该能够在那里做你需要做的事情。

- (void) popoverControllerDidDismissPopover:(UIPopoverController *) popoverController {
   //do stuff here...
}

Implement the -popoverControllerDidDismissPopover: method in your UIPopoverControllerDelegate and you should be able to do what you need to do in there.

- (void) popoverControllerDidDismissPopover:(UIPopoverController *) popoverController {
   //do stuff here...
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文