tags:

views:

35

answers:

2

Is it possible to put a badge on a UIToolbarItem? I have four items on my bottom UIToolbar, but I need to put a badge on it (similar to push notification badge with a number) to notify the user of something. How can I do this?

A: 

If you mean UITabBarItem, then there is a property badgeValue of type NSString. If you are talking about UIBarButtonItem you can use a customView and implement your own badge.

Joseph Tura
A: 

Create a UIBarButtonItem subclass, override drawRect.

To get the red badge, you can either use an image or do the drawing yourself.

christo16
The last example is drawing badges for table cells, not exactly what you're looking for, but will get you going.
christo16