使用iconfont时进行拼接字符图标

来源:互联网 发布:上海话剧艺术中心淘宝 编辑:程序博客网 时间:2024/04/30 08:29

    NSString *iconColorStr = [NSString stringWithFormat:@"0xff%@",childModel.color];

    unsigned long color = strtoul([iconColorStr UTF8String],0,16);//转化为16进制

    self.iconLabel.textColor= UIColorFromRGB(color);

    

    NSString * iconStr     = [NSString stringWithFormat:@"0x%@",@"e601"];

    unichar    icon        = strtoul([iconStr UTF8String],0, 16);

    self.iconLabel.text    = [NSString stringWithCharacters:&icon length:1];


    


0 0