iOS 7 - UISegmentedControl 没有保持突出显示? [英] iOS 7 - UISegmentedControl not staying highlighted?
问题描述
我有一个 UISegmentedControl,它正在运行 iOS 7 的 iPhone 应用程序上显示在我的 UINavigationBar 中.我注意到,当我选择 UISegmentedControl 中的值之一时,突出显示不会保持活动状态.也就是说,如果我选择第一个项目,它会触发我添加到其中的操作,但会立即取消突出显示我选择的值.
I have a UISegmentedControl that is being displayed within my UINavigationBar on an iPhone app running iOS 7. I've noticed that when I select one of the values in the UISegmentedControl the highlighting does not stay active. That is, if I select the first item, it triggers the action that I have added to it, but immediately un-highlights the value I selected.
这是预期的行为吗?一个错误?我不记得曾经在使用此控件的其他应用程序中看到过这种情况,它在 iOS 6 上运行良好.有想法吗?
Is this expected behavior? A bug? I don't recall ever seeing this in other apps using this control, and it works just fine on iOS 6. Thoughts?
推荐答案
确保 UISegmentedControl 的 momentary
属性为 NO (Apple 文档).
Make sure the momentary
property of the UISegmentedControl is NO (Apple docs).
这篇关于iOS 7 - UISegmentedControl 没有保持突出显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!