Coder Social home page Coder Social logo

emoji's Introduction

Emoji

emoji表情转换方案

移动端和PC端表情兼容方案 PC端:由于没有表情库,故手机端发送表情标示 (如&#x1f602)到服务器,服务器给PC端,PC接收到的字段都是&#x类,然后通过对应关系就可以知道是哪个表情,再通过网络下载图片显示在界面。PC端发送表情时候,也是先转换为&#x1f602标示,手机端接收到之后根据这个NSstring分类进行转换为\U000类型。 详情请见:emoji表情兼容处理说明.doc 文档

Emoji最终效果


  • 调用NSString+TYHEmoji分类;
  • //&#x1f602 ----->\U0001F604 - (NSString *)stringByReplacingEmojiCheatCodesToUnicode
  • //\U0001F604 -----> &#x1F602 - (NSString *)stringByReplacingEmojiUnicodeToCheatCodes

如下图所示:

emoji's People

Contributors

kssss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.