Emoji的介绍参见wiki,iOS支持的emoji表情列表参见http://pukupi.com/post/1964/,iOS支持的emoji表情的Unicode编码范围为[0xE001,0xE05A]&[0xE101,0xE15A]&[0xE201,0xE253]&[0xE401&0xE44C]&[0xE501,0xE537],Unicode编码转为NSString的方法为[NSStringstringWithFormat:@"%C", i].使用如下代码可以弹出一个可以选择Emoji表情的输入框,
- (void)didSelectAFace:(id)sender{
UIButton*button = (UIButton*)sender;
NSString*emojiStr = [NSStringstringWithFormat:@"%C", button.tag];
textView.text= [NSStringstringWithFormat:@"%@%@",textView.text,emojiStr];
}
- (void)hideEmojiView{
[emojiViewremoveFromSuperview];
[emojiCloseButtonremoveFromSuperview];
}
- (void)showEmojiView{
CGFloatx = (self.view.frame.size.width-300.0f)/2;
CGFloaty =self.view.frame.size.height-190;
if(emojiView==nil) {
self.emojiView= [[UIViewalloc]initWithFrame:CGRectMake(x,y,300.0f,140.0f)];
emojiView.backgroundColor= [UIColorlightGrayColor];
emojiView.alpha=0.8;
emojiView.layer.cornerRadius=6;
[emojiView.layersetMasksToBounds:YES];
UIScrollView*emojiScrollView = [[UIScrollViewalloc]init];
emojiScrollView.frame=CGRectMake(0,0,300.0f,140.0f);
[emojiViewaddSubview:emojiScrollView];
intxIndex =0;
intyIndex =0;
intemojiRangeArray[10] = {0xE001,0xE05A,0xE101,0xE15A,0xE201,0xE253,0xE401,0xE44C,0xE501,0xE537};
for(intj =0; j<10; j+=2) {
intstartIndex = emojiRangeArray[j];
intendIndex = emojiRangeArray[j+1];
for(inti = startIndex ; i<= endIndex ; i++ ) {
UIButton*button = [UIButtonbuttonWithType:UIButtonTypeCustom];
button.frame=CGRectMake(6+ xIndex*32,6+ yIndex*32,32.0f,32.0f);
[buttonsetTitle:[NSStringstringWithFormat:@"%C", i]forState:UIControlStateNormal];
button.tag= i;
[buttonaddTarget:selfaction:@selector(didSelectAFace:)forControlEvents:UIControlEventTouchUpInside];
[emojiScrollViewaddSubview:button];
xIndex +=1;
if(xIndex ==9) {
xIndex =0;
yIndex +=1;
}
}
}
[emojiScrollViewsetContentSize:CGSizeMake(300.0f,12+ (yIndex+1)*32)];
//closeButton
self.emojiCloseButton= [UIButtonbuttonWithType:UIButtonTypeCustom];
emojiCloseButton.frame=CGRectMake(x-10.0f, y-10.0f,24.0f,24.0f);
[emojiCloseButtonsetImage:[UIImageimageNamed:@"dialog_close.png"]forState:UIControlStateNormal];
[emojiCloseButtonaddTarget:selfaction:@selector(hideEmojiView)forControlEvents:UIControlEventTouchUpInside];
}
else{
emojiView.frame=CGRectMake(x,y,300.0f,140.0f);
emojiCloseButton.frame=CGRectMake(x-10.0f, y-10.0f,24.0f,24.0f);
}
[self.viewaddSubview:emojiView];
[self.viewaddSubview:emojiCloseButton];
}
iPhone Emoji Decimal Character Entities
The complete list of iPhone emoji and their respective decimal character entities:
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
|
|
|
转载地址:http://pukupi.com/post/1964/
分享到:
相关推荐
iOS系统风格的Emoji表情图片,图片大小72x72,png后缀,共3184个,Emoji的版本为v13.0。压缩包内提供PHP的使用示例,文档生成于2020年3月2日。
最近刚把emoji表情整理完,这里是我的一些自己的心得。开始做的时候,我是通过Unicode对emoji的表情一个一个的读取,但有些表情他们分布的比较乱,而且对应有的是两个Unicode组合而成(比如国旗),在转换之间会挺...
IOS风格的Emoji表情源码核心功能使用library的方式提供引用,使用的时候只需参照Sample里面的代码对普通的EditText控件进行设置就可以了,非常方便。点击下面表情就可以把表情添加的文本框,可以重用到自己的项目中...
android 输入框EditText禁止输入Emoji表情符,博客地址:http://blog.csdn.net/elsdnwn/article/details/45390771
iOS下的开源Emoji键盘
Android 中Emoji表情 demo演示 文字emoji混合输入 OK Eclipse 中demo 实现 * 1、点击emoji 显示emoji代码 用户在数据库中存储 * 2、edittext 中显示、文字、emoji混合输入 【参考代码】...
判断字符串是否包含emoji表情
android仿简单的实现emoji表情功能,可以发送出表情用Textview列表来显示出来。代码简单,拷贝就可以使用
使用js处理ios或android输入的emoji表情符号
Emoji 是一套起源于日本的12×12像素表情符号,由栗田穣崇(Shigetaka Kurit)创作,最早在日本网络及手机用户中流行,自苹果公司发布的iOS 5输入法中加入了emoji后,这种表情符号开始席卷全球,目前emoji已被大多数...
IOS8 细黑字体+EMOJI超大表情,黑白EMOJI表情
提取项目中的emoji表情
Android 开发项目中使用emoji表情
本例子是一个IOS风格的用Fragment实现的Emoji表情碎片例子源码,核心功能使用library的方式提供引用,使用的时候只需参照Sample里面的代码对普通的EditText控件进行设置就可以了,非常方便。点击下面表情就可以把...
抖音官方emoji表情,emoji格式为webp。如果需要其他格式可以使用“格式工厂”转换一下。http://www.pcgeshi.com/
1、开源案例源码,刚好找到,里面自己优化了一下脚本 2、适用于微信登录含有Emoji表情进行处理显示
Android中emoji的处理以及和iOS端互通 一个简单的demo
Android的EditText中加入emoji表情包,可实现文字字符和表情混显
通用emoji表情包与JSON