Array with set number of objects/"Favouriting images"

Discussion in 'iOS Development' started by spykr, Feb 12, 2009.

  1. spykr

    spykr Banned

    Jan 4, 2009
    Likes Received:
    I'll copy and paste the two questions from a thread on another forum.

    "I want to be able to set a number, then an array is made with that amount of objects and all the objects should be @"0".
    Is this possible?
    Also, if I save this array to NSUserDefaults, it loads up and sees that the number is higher than the currently saved objects, can I make it add the amount of objects that is needed?"

    "Ok, I'm confused.
    With the application I'm working on, a random number is chosen (from 1 to 25) then added to .png to make an image come up on the screen. After 5 seconds, it changes again. I want to add a button to add/remove the current image to/from favourites and then be able to view the favourites.
    I'm not really sure how I would make it able to tell which images are favourited and show them. "
  2. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Sep 19, 2007
    Likes Received:


    There are dozens of different ways to do this. You need to be more specific about how your app is set up and what you want to do/can do.

Share This Page