PDA

View Full Version : Badge




MacBuddySupport
Aug 27, 2008, 05:07 PM
Hey, could someone post a couple line of code on how to count how many items you have in a table view and display them as a badge on the applications home screen?

Please help



Niiro13
Aug 27, 2008, 06:10 PM
Easiest if you have like an array of that table's data...then you'd just go

[UIApplication sharedApplication].applicationIconBadgeNumber = [array count];

MacBuddySupport
Aug 27, 2008, 09:13 PM
Easiest if you have like an array of that table's data...then you'd just go

[UIApplication sharedApplication].applicationIconBadgeNumber = [array count];

OK, What file do I put it in. The Delegate, ViewController? .m or .h file?

Make a quick tutorial on what I need to do. What lines of code need to go into the h file and m file. I have tried this method and got no results except for an error.

Please help,

admanimal
Aug 27, 2008, 10:11 PM
Do you actually want to learn how to create an app yourself? Asking for this type of help is not the way...

roberthuttinger
Nov 21, 2008, 01:42 PM
so noodle it out. you can only have an array count where the array is instantiated and used, therefore, you can only use the update badge code where.........

cheers.bo

wyzfam :apple: tCiMP :apple: tMiMP :apple: My Baby Signs