I would like to display a unicode character (the speaker symbol U+1F50A) in label. Is it possible to enter this symbol in Interface Builder?
To insert a Unicode character, type the character code, press ALT, and then press X. For example, to type a dollar symbol ($), type 0024, press ALT, and then press X.
in xcode? Use the control command space keyboard shortcut, or choose Edit → Emoji & Symbols from the menu bar. You can also use "\u{203C}\u{FE0F}" instead of "‼️" in a string or character literal.
To install a Unicode keyboard on your iPhone or iPad, launch the App Store and download the free UniChar app. Then launch Settings, General, Keyboard, Keyboards, Add New Keyboard…, and select UniChar from the options.
Yes, you can click "Edit" > "Special Characters…" — there you can find all unicode characters (including the emoji) and copy/paste them where you set the label text in Interface Builder.
EDIT: In Xcode 6 it's "Edit" > "Emoji & Characters"
Xcode 7+: "Edit" > "Emoji & Symbols"
For those who tried doing it programmatically, but failed, just use this:
label.text = @"\U0001F50A";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With