Discussion in 'iOS Programming' started by MacBuddySupport, Aug 27, 2008.

  1. MacBuddySupport macrumors member


    Nov 19, 2007
    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
  2. Niiro13 macrumors 68000

    Feb 12, 2008
    Easiest if you have like an array of that table's data...then you'd just go

    [UIApplication sharedApplication].applicationIconBadgeNumber = [array count];
  3. MacBuddySupport thread starter macrumors member


    Nov 19, 2007
    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,
  4. admanimal macrumors 68040

    Apr 22, 2005
    Do you actually want to learn how to create an app yourself? Asking for this type of help is not the way...
  5. roberthuttinger macrumors newbie

    Sep 24, 2008
    nirr0 gave you exactly what you asked for.

    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.........

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

Share This Page