Badge

Discussion in 'iPhone/iPad Programming' started by MacBuddySupport, Aug 27, 2008.

  1. macrumors member

    MacBuddySupport

    Joined:
    Nov 19, 2007
    #1
    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. macrumors 68000

    Joined:
    Feb 12, 2008
    Location:
    Illinois
    #2
    Easiest if you have like an array of that table's data...then you'd just go

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

    MacBuddySupport

    Joined:
    Nov 19, 2007
    #3
    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. macrumors 68040

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

    Joined:
    Sep 24, 2008
    #5
    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.........

    cheers.bo

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

Share This Page