Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 OSX 应用程序中有一个组合框,我希望它在更改值选择后立即失去焦点。
现在它只是在选择后保持选中并突出显示。
任何形式的帮助都非常感谢!
只是我自己想通了。
使用NSComboBoxDelegate,我用这个方法
- (void)comboBoxWillDismiss:(NSNotification *)notification
它在弹出列表将被解除之前被调用。在我调用的那个方法里面:
[myComboBox setRefusesFirstResponder:YES];
它成功了。