Here’s a handy-looking little class for doing MobileMail-style badges in your table views: TDBadgedCell!

Each badge is drawn in a custom view using CoreGraphics. This means the class does not rely on extra images stored in memory, and the badges are drawn quickly on demand. You can set color properties for each badge, indicating hues for both the normal and highlighted states.
When working with cells without accessories — accessories are a table cell property defined in the official SDK — the badge is placed into the accessory view. When accessories have been defined, the badge is instead placed conditionally, to the left of of any shown accessory. The screen shot here demonstrates the use of the TDBadgedCell class using a table with disclosure chevron accessories.
The class inherits directly from UITableViewCell, and can be used in its place when providing cells for a table’s data source. Simply add the class to your Xcode project and return badged cells instead of standard table view cells. Use setBadgeNumber: to set the badge to an integer value.
Sounds properly designed, looks elegant, good stuff indeed!
h/t: TUAW!
UPDATE:
Here’s an alternative cell badge implementation which looks like it adds some features: DDBadgeViewCell!
Continue Reading →JAN