xcode 如何在代码中添加表情符号?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36846897/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:17:30  来源:igfitidea点击:

How to add Emoji in code?

xcodeemoji

提问by 4thSpace

In Xcode, I've previously gone to Editor > Emoji & Symbols, found some Emoji, double clicked it and had it appear in my code where the cursor is.

在 Xcode 中,我之前转到编辑器 > 表情符号和符号,找到了一些表情符号,双击它并让它出现在我的代码中光标所在的位置。

I'm trying to do that now and nothing is happening. I can't find any way to get the Emoji into Xcode.

我现在正在尝试这样做,但什么也没有发生。我找不到将表情符号输入 Xcode 的任何方法。

Does anyone have some suggestion?

有人有什么建议吗?

回答by redent84

This solution is for Mac OS (Mavericks and up) and not only Xcode:

此解决方案适用于 Mac OS(Mavericks 及更高版本),而不仅适用于 Xcode:

Cmd+Ctrl+Space

Cmd+ Ctrl+Space

Will bring this menu, where you can simply click on the one you want:

将带来此菜单,您可以在其中单击所需的菜单:

emoji picker menu

表情符号选择器菜单

回答by Shobhakar Tiwari

Open Xcode -> Edit Menu -> Choose enter image description here

打开 Xcode -> 编辑菜单 -> 选择 在此处输入图片说明

Then Emoji appears , Here is snapshot :

然后表情符号出现,这是快照:

enter image description here

在此处输入图片说明

Note : - Xcode 7.2.1

注意: - Xcode 7.2.1

Hope it Helps. Thanks

希望能帮助到你。谢谢