iOS 5 symbol characters compatibility issue

401 views
Skip to first unread message

Mark Smith

unread,
Oct 17, 2011, 4:57:18 PM10/17/11
to a2-coc...@googlegroups.com
Overall, I am impressed by how few compatibility issues iOS 5 has
introduced (at least for the apps I work on).

That said, at last week's A2 CocoaHeads meeting, Duane mentioned an iOS
5 compatibility issue related to the "heart" character (Unicode 0x2665).
I did some investigation because we recently used that character in
one or our apps within a rating view (to allow people to choose 1-5
hearts, similar to the common 1-5 star rating widgets). It turns out
that Apple replaced a bunch of glyphs in the system font (Helvetica),
and in many other fonts, with glyphs from Emoji. Kind of surprising.

If you search Apple's developer forums for "disable emoji in a UILabel"
you will find a thread where people are discussing this issue (other
characters including the right-pointing triangle that looks like a play
button are affected too).

For now, we worked around the problem in our app by using ArialMT in the
UIButtons and UILabels where we use heart characters (apparently,
ArialMT escaped Apple's changes). A better solution would be to use an
image instead of a character. We haven't released the app that uses any
of this to the App Store yet, so it is not a real world issue for us yet.

Side note: we found the following free Fonts app to be very useful in
understanding the differences between OS 4.x and 5.0:

http://itunes.apple.com/app/fonts/id285217489

A couple of screenshots that show some of the Helvetica glyphs in iOS
4.x and 5.0 are attached. The heart character we are using looks like a
simple black heart in OS 4.x (and it can be colored via
UILabel.textColor, UIButton setTitleColor, etc.) The iOS 5 glyph looks
like a heart on a playing card and it is always red.

--
Mark Smith
Pearl Crescent, LLC
http://pearlcrescent.com/

iOS4-Helvetica.png
iOS5-Helvetica.png

Duane Fahey

unread,
Oct 18, 2011, 12:03:17 PM10/18/11
to a2-coc...@googlegroups.com
Thanks for the info Mark!

I'm using the heart character for a UITableview index (for favorites).  I don't think the font can be modified for this, so my solution (so far) is to use unicode 2764 instead of 2665.  This displays as a normal colored heart in iOS 4 (black or gray), and a red heart (not a playing card) in iOS 5.

Perhaps not the best solution, but the best I have so far…

BTW, the UILocal Notification problem that I mentioned at the meeting does not appear to happen with my new iPhone 4S.  I'm not sure yet if this is a small difference in the final build of iOS 5.  - Duane

-- 
Follow us on Twitter @Gormaya
TasteTimer, Conversions for Cooking, Substitutions
Gormaya | Apps for Cooks

--
You received this message because you are subscribed to the Google Groups "CocoaHeads Ann Arbor" group.
To post to this group, send email to a2-coc...@googlegroups.com.
To unsubscribe from this group, send email to a2-cocoahead...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/a2-cocoaheads?hl=en.

Attachments:
- iOS4-Helvetica.png
- iOS5-Helvetica.png

Reply all
Reply to author
Forward
0 new messages