Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unicode characters being drawn differently in iOS5

Setting the title of a uibutton to u25C0 causes it to have a blue background in iOS5 but not in iOS4.3.

Strangely enough setting the title to u25C2, 2 characters a head in line, appears as expected. Go fig. I will be attaching an image later.

As a side note is this blue button currently in use in any Apple apps?

Thanks.

enter image description here

Left : iOS 5 Right : iOS 3.2

This was done by setting the title to the unicode character stated earlier.

like image 441
Biclops Avatar asked Dec 01 '11 02:12

Biclops


2 Answers

You can try to use Unicode6.1's variation selector. For about Emoji, adding "\U0000FE0E" to specify non-coloured glyph.

For example, for about left-triangle(U+25C0), you can specify like @"\U000025C0\U0000FE0E", and that changed glyph from Apple Color Emoji style to non-colored plain emoji, at least on iOS6 simulator on Mountain Lion.

Swift 4.0

let glyph = "\u{000025C0}\u{0000FE0E}"
like image 126
Tsuneo Yoshioka Avatar answered Nov 16 '22 02:11

Tsuneo Yoshioka


You need to set the font appropriately. The blue icon you're seeing is U+25C0 in the Apple Color Emoji font. I'm not sure what other fonts on iOS include the symbol you want, but if you find that font and set it explicitly then it should render the icon you want.

like image 32
Lily Ballard Avatar answered Nov 16 '22 00:11

Lily Ballard