当我将 customView 设置为 nil 时,UIBarButton 不会自行恢复

发布于 2024-10-06 12:20:11 字数 203 浏览 0 评论 0原文

我有一个 UIBarButtonItem 可以刷新我的数据,在更新过程中,我将refreshButton.customView 设置为 UIActivityIndi​​cator 的实例,该实例显示正常。但是,当数据更新并且我调用refreshButton.customView = nil时,初始的UIBarButtonItem不再显示(只是一个空白区域)。有人知道我该如何解决这个问题吗?

I've got a UIBarButtonItem that refreshes my data, and while the update is in process, I set refreshButton.customView to an instance of UIActivityIndicator, which is displayed fine. However, when data has been updated and I call refreshButton.customView = nil, the initial UIBarButtonItem is not displayed any more (just a blank space). Anyone knows how can I fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文