gpt4 book ai didi

ios - 在 iOS 应用程序的键盘上仅显示一部分表情符号

转载 作者:行者123 更新时间:2023-11-29 02:00:17 25 4
gpt4 key购买 nike

我正在制作一个应用程序,我将“人物”表情符号用作头像,将“食物和饮料”表情符号用作食物和饮料图标。我想使用常规键盘来呈现表情符号以供用户输入,但我只想呈现这两类表情符号(即使如此,每个类别都会在不同的上下文中呈现)。

我正在使用 iOS 8、Xcode 6.3 和 Swift。

我能否配置常规键盘,使其仅显示我定义的表情符号子集?

如果没有,我可以创建一个新的自定义键盘,保留原始 Apple 键盘的所有内容但限制字符子集吗?有关如何执行此操作的任何指示吗?

谢谢。

最佳答案

您无法配置常规键盘,使其仅显示表情符号的子集。但是可以制作您自己的自定义键盘。

您可以找到一些关于如何制作自定义键盘的非常好的帖子:

我还找到了这个 FaceBoardPlus 示例:http://code4app.net/ios/FaceBoardPlus/52a9ba56cb7e841e178b69d0这正是您正在寻找的内容,但用 objective-c 编写。

编辑: From iOS developer library :

After a user chooses a custom keyboard, it becomes the keyboard for every app the user opens. For this reason, a keyboard you create must, at minimum, provide certain base features. Most important, your keyboard must allow the user to switch to another keyboard.

To provide a fully custom keyboard for just your app or to supplement the system keyboard with custom keys in just your app, the iOS SDK provides other, better options. Read about custom input views and input accessory views in Custom Views for Data Input in Text Programming Guide for iOS.

关于ios - 在 iOS 应用程序的键盘上仅显示一部分表情符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30457796/

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