Claireware Software

Software for Your Mac and iPhone

Number Badge View

MKNumberBadgeView Sample
For a recent contract job that I did, I needed to arbitrarily display number badges within the app. While the iPhone SDK has facilities to show a number badge on your app's icon or in a toolbar, it doesn't allow you to arbitrarily place or use number badges (or at least, I haven' found a way). So I wrote a view class that implements a number badge. The class is called MKNumberBadgeView, and is basically designed to be a drop in class. There is no IB support (yet), so you will have to configure the object via code. MKNumberBadgeView allows you to configure not only the badge color, but also the font used for the number, plus a few other minor aesthetics options.

I've released the source code under the Apache 2.0 license, so use and abuse as you see fit. You can find the code on Github here, documentation is in the header file.
blog comments powered by Disqus
Site logo
Claireware Software
© 2009-2012 Michael Kamprath • Privacy PolicyLegalContact