注册

iOS 自己在表情栏看得到静态图看不到动态图 动态图发送出去也不能显示

已邀请:
- (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文件你导入一下

要回复问题请先登录注册