In my application i want to display emoji icon with string but its giving me syntax error.
It's displays below string successfully
unichar character = 0xE116;
self.uniCharStr =[NSString stringWithCharacters:&character length:1];
But its giving syntax error while i use value as following.
unichar character = 💡
self.uniCharStr =[NSString stringWithCharacters:&character length:1];
I have get this values from emoji icon list from this link.
Can anyone please guide me where i m wrong ?
Thanks!
Try
\U0001F4A1
instead of💡
You should replace
&#x
withU000
also dont forget to add an escape sequence.Edit :
To display the emoji in a label, I use the following code.