Cherif Cherif - 7 months ago 35
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 ?


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}" //