Array with set number of objects/"Favouriting images"

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

  1. spykr

    spykr Banned

    Joined:
    Jan 4, 2009
    Messages:
    109
    Likes Received:
    0
    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

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Yes.

    Yes.


    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