Presenting just a subset of emojis on the keyboard on iOS apps

安稳与你 提交于 2019-12-23 05:29:06

问题


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).

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?

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?

Thanks.


回答1:


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

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.

EDIT: 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.



来源:https://stackoverflow.com/questions/30457796/presenting-just-a-subset-of-emojis-on-the-keyboard-on-ios-apps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!