Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

RagingGoat

macrumors 6502
Original poster
Jun 21, 2010
307
15
The home screen of my app has several buttons. I'm wondering if there is a way to add a badge for push notifications to one of those buttons.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
There's no built-in way to draw a badge. The only built-in badge support that I know of is to add a badge to your app's icon on the springboard (maybe something also for tabs in a tab controller). There's a certain amount of source code floating around to do that so look for it.
 

Duncan C

macrumors 6502a
Jan 21, 2008
853
0
Northern Virginia
The home screen of my app has several buttons. I'm wondering if there is a way to add a badge for push notifications to one of those buttons.

It would be pretty easy to create a custom subclass of UIButton that has the option to display a badge. Then the view controller that manages the button could set the button's badge value as needed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.