问题
I am receiving the string @"\\U0001F603"
from an API, which is the Unicode code point for the emoji 😃.
I want to display it using an UILabel
's text
property. If I directly set it, it shows \U0001F603
instead of the actual emoji.
How can I display the emoji at the received Unicode code point?
回答1:
You have to remove first slash. like this
label.text=@"\U0001F603";
😃.
回答2:
This usually helps me
[NSString stringWithUTF8String:model.UTF8String];
来源:https://stackoverflow.com/questions/38181966/print-unicode-emoji-from-api-response