IPhone: add an icon to the icons embedded in my app.
I know this article is a little out of date, but it helps me recently to create a small class for creating custom icons. I thought it would be fair to make this class open to everyone. So, here's CustomBadge .
in the best way - Sasha
source to share
There are many ways to do this. You can overlay a UILabel on an icon (which can be a UIView or a UIImageView). You can put another view on top of the icon and draw text directly in that view. Or make your icon view a subclass of UIView, and when you get a draw call, you draw the icon and number.
Plus, you can play with blend modes, shadows, masking, and more to create something visually appealing.
I would probably start reading more about Quartz if you haven't already. The rest is how you connect it all.
And some other links:
http://scientificninja.com/development/numeric-badges-on-the-iphone http://th30z.netsons.org/2009/03/qt4-drawing-notification-badges/ alt text http: //th30z.netsons .org / wp-content / uploads / qtdrawbadges.png
source to share