Showing emoji in a UILabel?

前端 未结 5 1409
花落未央
花落未央 2020-12-13 04:50

Not sure what I\'m missing here, and searching hasn\'t helped me. I want to display emoji characters in a UILabel, and this isn\'t doing it:

UILabel *label =         


        
5条回答
  •  醉酒成梦
    2020-12-13 05:27

    You are probably not using the correct encoding for your emoji characters. For instance in your example I think you are looking for something like this:

    label.text = [NSString stringWithFormat:@"%C", 0xe04f];
    

    Have a look at this table to get the encodings you need.

提交回复
热议问题