为什么条形按钮不会变回蓝色? [英] Why doesn't bar button change back to blue?

查看:119
本文介绍了为什么条形按钮不会变回蓝色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用主页面中有一个+按钮。它是 UIBarButtonItem 。我在代码中没有做任何事情,只用segue将它连接到故事板中的另一个视图控制器。按钮以正常的蓝色开始。在我关闭被引用的视图控制器后,条形按钮项目由于某种原因显示为灰色。有谁知道为什么?就像我说的,我在代码中没有做任何事情(没有连接到条形按钮)。

I have a '+' button in my main page of my app. It is a UIBarButtonItem. I don't do anything with it in code, only connect it to another view controller in storyboard with segue. The button starts out with its normal blue color. After I dismiss the view controller that was segued to, the bar button item appears gray for some reason. Does anyone know why? Like I said, I do nothing with it in code(nothing connected to the bar button).

编辑:我的主视图控制器有'+'栏按钮,我猜到了一个人。那个popover然后转向另一个控制器。当 视图控制器解散时,我直接返回主屏幕而不实际解除第一个弹出窗口。所以,我认为它仍然是导航堆栈的一部分。这些信息有用吗?

My main view controller has the '+' bar button, and I segue to a popover. That popover then segues to another controller. When that view controller dismisses, I return straight back to the home screen without actually dismissing the first popover. So, I think it's still a part of the navigation stack. Is this information helpful?

推荐答案

特别感谢@matt帮我解决这个问题。

Special thanks to @matt for helping me with this issue.

这似乎是iOS中的一个错误,如此答案所示。

It seems like this is a bug in iOS, as shown in this answer.

这篇关于为什么条形按钮不会变回蓝色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆