Search code examples
swiftextended-ascii

Symbols in swift - xcode 6


I insert few symbols in my application, some of these symbols appears properly, but some of them only a square with a face appears instead, Do I need to add any framework in order to display all these symbols properly? enter image description here


Solution

  • In swift, If you want to display any Unicode character use this format :

    var str="\u{ /*Unicode value*/ }"
    

    In your case:

    cell.textLabel?.text="A\u{FB06}" //A𝑠𝑡 Code for 'st' is FB06
    

    Edit: Screenshot- enter image description here

    Edit 2 UITableView don't support extended characters. See the comment below.