I am new to swift development. I need to show the emoji inside the text field and labels. I also need to send them to server because Application is multi-platform.
On Xcode version 7.2.1+, you can use the below shortcut to show the symbols panels and insert the emoji:
Shortcut: (press the below three keys together)
Ctrl + Command + Space
You can declare a string variable with text and an emoji inside using its unicode number (1F603 is unicode number for an open faced smiley), like so:
let str : String = "Smiley \u{1F603}"
Then with your UITextField/UILabel, set the .text attribute to be the string.
yourTextField.text = str
//or for a UILabel.
yourLabel.text = str
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