1. Due to the recent site upgrade, the iPadForums (iPF) App will no longer work. The new iPadForums.net website has been designed from the ground up to work perfectly from any mobile, tablet, or desktop computer using the built in internet browser. Create a shortcut to iPadForums.net on your home screen by following these steps: Create an icon for iPadForums.net

Making object with variable

Discussion in 'iPad Development' started by Treehugger, Sep 21, 2011.

  1. Treehugger
    Offline

    Treehugger iPF Noob

    Joined:
    Dec 17, 2010
    Messages:
    1
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Amsterdam (The Netherlands)
    Ratings:
    +0 / 0
    Hi,

    I have 9 UIImageView objects in my app.
    Now I want to make a loop to change settings on every object.

    Is it possible to have a for-loop and use the variable to make the object?

    for(i=0;i<10;i++) {

    [["object"+i] setBackgroundColor:bg];

    }

    Something like that. Is this possible? And how can I do that?

    Hope someone knows the answer :)

Share This Page