Reputation: 7778
I would like to create a label with some unicode text and a music note. The notes are shown below:
I have tried:
titleLabel.text = @" title + ♫";
but that results in:
I must be doing something dumb.. Any advice welcome.
Upvotes: 0
Views: 728
Reputation: 2183
The number column in your table actually contains HTML/SGML/XML entities with decimal values. A unicode escape sequence in NSString takes the hexadecimal value, so your note ♫
would be the hex value 0x266b to be used like this
titleLabel.text = @" title \u266b";
Upvotes: 1
Reputation: 732
Hit cmd+cntrl+space in Xcode, and search for 'note'. There are some u may use. Just double click one and it will be written where your cursor is in the code.
Upvotes: 0