在iOS应用程序的键盘上仅显示表情符号的一部分 [英] Presenting just a subset of emojis on the keyboard on iOS apps

查看:124
本文介绍了在iOS应用程序的键盘上仅显示表情符号的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am making an app where I use the "People" emojis as avatar faces and the "Food and drink" emojis for, well, food and drink icons. I would like to use the regular keyboard for presenting the emojis for user input, but I would like to present only these two categories of emojis (and even so, each category would be presented in a different context).

我正在使用iOS 8,Xcode 6.3和Swift.

I am working with iOS 8, Xcode 6.3 and Swift.

我可以配置常规键盘,使其只显示我定义的表情符号的子集吗?

Can I configure the regular keyboard so that it only shows a subset of emojis which I define?

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

If not, can I create a new custom keyboard preserving everything from the original Apple keyboard but limiting the subset of characters? Any pointers on how to do this?

谢谢.

推荐答案

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

You can not configure the regular keyboard so that it only shows a subset of emojis. But yes can make your own custom keyboard.

您可以找到一些有关如何制作自定义键盘的非常好的文章:

You can find some really good posts about how to make the custom keyboards:

  • http://verisage.us/en/blog/2014/07/17/ios-8-custom-keyboard-swift-tutorial/
  • http://code.tutsplus.com/tutorials/ios-8-creating-a-custom-keyboard-in-swift--cms-22344

我也找到了这个FaceBoardPlus示例: http://code4app.net/ios/FaceBoardPlus/52a9ba56cb7e841e178b69d0正是您要查找的内容,但是用目标c编写.

Also I found this FaceBoardPlus sample: http://code4app.net/ios/FaceBoardPlus/52a9ba56cb7e841e178b69d0 which is exactly what you are looking for but written in objective c.

编辑:来自iOS开发人员库:

用户选择自定义键盘后,它将成为 用户打开的每个应用.因此,您必须创建一个键盘, 至少要提供某些基本功能.最重要的是 键盘必须允许用户切换到另一个键盘.

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.

仅为您的应用程序提供完全自定义的键盘或进行补充 仅在您的应用程序iOS SDK中带有自定义键的系统键盘 提供其他更好的选择.了解有关自定义输入视图和 在数据输入的自定义视图文字 iOS编程指南.

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应用程序的键盘上仅显示表情符号的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆