你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
搜索问题、话题或人...
输入关键字进行搜索
搜索:
问题
精选文章
开源项目
视频教程
活动
· · ·
帮助
登录
注册
环信_iOS
iOS 自己在表情栏看得到静态图看不到动态图 动态图发送出去也不能显示
没有找到相关结果
已邀请:
与内容相关的链接
提交
2 个回复
xiaodown2013
- (NSArray*)emotionFormessageViewController:(EaseMessageViewController *)viewController 在这个方法里添加
NSMutableArray * gifs = [NSMutableArray array];
for (int i = 1001;i< 1085; i++) {
[gifs addObject:[NSString stringWithFormat:@"%d",i]];
}
NSMutableArray * pngs =[NSMutableArray array];
for (int i = 1001; i<1085; i++) {
[pngs addObject:[NSString stringWithFormat:@"%d",i]];
}
NSArray *names = @[@"无奈",@"斜眼",@"冷汗",@"酷",@"感冒",@"献花",@"愤怒",@"冷",@"无言",@"花",@"拜拜",@"时间",@"过来呀",@"拳",@"ok",@"合作",@"花痴",@"不想说啥",@"嘿嘿",@"不是吧",@"鬼脸",@"哈哈大笑",@"不许骂人",@"得意",@"空空",@"委屈",@"电话",@"惊讶",@"可怜",@"鬼",@"干杯",@"傻笑",@"吐",@"无聊",@"鸡飞过",@"流泪",@"大喊",@"不屑",@"大哭",@"招财",@"耶",@"乖",@"思考",@"恭喜发财",@"嗨起来",@"心碎",@"献吻",@"遁甲",@"打盹",@"偷笑",@"鄙视",@"疑问",@"忍者",@"元宝",@"礼物",@"投降",@"好主意",@"兵哥哥",@"难过",@"收礼物",@"算账",@"小二",@"查查看",@"cs",@"牛",@"腼腆",@"财神",@"雷",@"喝彩",@"超级无语",@"嚎啕大哭",@"爱",@"暴怒",@"棒棒的",@"惊恐",@"全给你",@"寄邮件",@"害羞",@"嘘",@"月亮",@"等着瞧",@"凋谢",@"天使",@"亲亲"];
int index = 0;
for (NSString *name in names) {
EaseEmotion *emotion = [[EaseEmotion alloc] initWithName:name emotionId:[NSString stringWithFormat:@"em%d",(1000 + index + 1)] emotionThumbnail:[NSString stringWithFormat:@"%@.png",pngs[index]] emotionOriginal:[NSString stringWithFormat:@"%@",gifs[index]] emotionOriginalURL:@"" emotionType:EMEmotionGif];
[emotionGifs addObject:emotion];
[_emotionDic setObject:emotion forKey:[NSString stringWithFormat:@"em%d",(1000 + index + 1)]];
index++;
}
EaseEmotionManager *managerGif= [[EaseEmotionManager alloc] initWithType:EMEmotionGif
emotionRow:2 emotionCol:4
emotions:emotionGifs
tagImage:[UIImage imageNamed:@"1001@2x.png"]];
华子的世界
demo中有一个resource文件你导入一下
要回复问题请先
登录
或
注册
发起人
Natai
问题状态
最新活动:
2016-04-28 16:33
浏览:
6315
关注:
3
人
2 个回复
xiaodown2013
NSMutableArray * gifs = [NSMutableArray array];
for (int i = 1001;i< 1085; i++) {
[gifs addObject:[NSString stringWithFormat:@"%d",i]];
}
NSMutableArray * pngs =[NSMutableArray array];
for (int i = 1001; i<1085; i++) {
[pngs addObject:[NSString stringWithFormat:@"%d",i]];
}
NSArray *names = @[@"无奈",@"斜眼",@"冷汗",@"酷",@"感冒",@"献花",@"愤怒",@"冷",@"无言",@"花",@"拜拜",@"时间",@"过来呀",@"拳",@"ok",@"合作",@"花痴",@"不想说啥",@"嘿嘿",@"不是吧",@"鬼脸",@"哈哈大笑",@"不许骂人",@"得意",@"空空",@"委屈",@"电话",@"惊讶",@"可怜",@"鬼",@"干杯",@"傻笑",@"吐",@"无聊",@"鸡飞过",@"流泪",@"大喊",@"不屑",@"大哭",@"招财",@"耶",@"乖",@"思考",@"恭喜发财",@"嗨起来",@"心碎",@"献吻",@"遁甲",@"打盹",@"偷笑",@"鄙视",@"疑问",@"忍者",@"元宝",@"礼物",@"投降",@"好主意",@"兵哥哥",@"难过",@"收礼物",@"算账",@"小二",@"查查看",@"cs",@"牛",@"腼腆",@"财神",@"雷",@"喝彩",@"超级无语",@"嚎啕大哭",@"爱",@"暴怒",@"棒棒的",@"惊恐",@"全给你",@"寄邮件",@"害羞",@"嘘",@"月亮",@"等着瞧",@"凋谢",@"天使",@"亲亲"];
int index = 0;
for (NSString *name in names) {
EaseEmotion *emotion = [[EaseEmotion alloc] initWithName:name emotionId:[NSString stringWithFormat:@"em%d",(1000 + index + 1)] emotionThumbnail:[NSString stringWithFormat:@"%@.png",pngs[index]] emotionOriginal:[NSString stringWithFormat:@"%@",gifs[index]] emotionOriginalURL:@"" emotionType:EMEmotionGif];
[emotionGifs addObject:emotion];
[_emotionDic setObject:emotion forKey:[NSString stringWithFormat:@"em%d",(1000 + index + 1)]];
index++;
}
EaseEmotionManager *managerGif= [[EaseEmotionManager alloc] initWithType:EMEmotionGif
emotionRow:2 emotionCol:4
emotions:emotionGifs
tagImage:[UIImage imageNamed:@"1001@2x.png"]];
华子的世界