Cherif Cherif - 2 years ago 132
Swift Question

How to include emoticons in Swift string?

Here is a pretty good article that references iOS emoticons and their code. For example

for the small camera.

I tried this in my code :

var myText: String = "\ue008"

This is not accepted by xCode. How to include it ?

Answer Source

That's from swift documentation:

let dollarSign = "\u{24}"        // $,  Unicode scalar U+0024
let blackHeart = "\u{2665}"      // ♥,  Unicode scalar U+2665
let sparklingHeart = "\u{1F496}" // 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download