I would like to set some unicode strings (for a custom font icon).
Like:
cell.centerIconLabel.text = "\u{f013}"
But when i now read some variables from a webservice, how can i convert this to an unicode string?
If the webservice returns me "\u{f013}" and i set this as string, it will show only the string (and not the icon).
// not working
cell.centerIconLabel.text = item.icon // which contains "\u{f013}"
Any ideas?
Edit:
Thanks Martin, that was the answer i was looking for. Maybe add as answer here too (was unable to find it on Stackoverflow).
let code = 0xf013
cell.centerIconLabel.text = String(UnicodeScalar(code))