macOS 上 NSPopover 中的表情符号列表(如消息应用程序)

2024-04-11

我想展示一个NSPopover在我的 Mac 应用程序中,它列出了表情符号,就像 Apple 的消息应用程序一样:

到目前为止我能弄清楚的是,我可以使用以下命令在我的应用程序中显示字符调色板:

NSApp.orderFrontCharacterPalette(nil)

But that shows the palette as a separate window like this: macOS Character Palette

有谁知道我如何将字符调色板嵌入到NSPopover并在我的应用程序中检索选定的表情符号(类似于Apple在消息中的做法)?


将您的 textView、textField 或任何其他视图设置为发送者NSApp.orderFrontCharacterPalette(_:).

NSApp.orderFrontCharacterPalette(self.textField)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

macOS 上 NSPopover 中的表情符号列表(如消息应用程序) 的相关文章

随机推荐