gpt4 book ai didi

xcode - NSTextField 的 "Value With Pattern"绑定(bind)中的条件显示模式

转载 作者:行者123 更新时间:2023-12-03 16:15:45 24 4
gpt4 key购买 nike

我有一个文本字段,显示 NSArrayController 中的项目数和所选项目的数量,如下所示:

3 of 5 selected

此外,我想在没有选定项目时显示另一种模式,例如:

5 items

有没有办法只使用 Interface Builder 而不使用代码来做到这一点?

最佳答案

第一种情况:{value2}@ of %{value1}@

对于第二种情况:%{value2}@ Items

两者都想要吗?

如果是,请使用上述两者。

关于xcode - NSTextField 的 "Value With Pattern"绑定(bind)中的条件显示模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10107141/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com