IPhone: add an icon to the icons embedded in my app.

I am trying to add icons to icons in my application. for example in the facebook app the home page displays the number of pending requests on the request icon.

Can anyone provide any links / ideas on how to do this?

Thank you in

+2


source to share


3 answers


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

+7


source


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

+3


source


The Three20 project (its code is part of the Facebook app) has these icons.

+1


source







All Articles