Referring to all objects of a class at once

Discussion in 'iOS Programming' started by mmm11105, Jan 28, 2010.

  1. mmm11105 macrumors newbie

    Jan 28, 2010
    If I create a class (NSObject) and make multiple objects from it (myObject1, myObject2). How would I refer to all of them at once, say if I want them all to make left 5px or check for collisions with an object.
  2. xsmasher macrumors regular


    Jul 18, 2008
    Make an array, and put them in the array as you create them. Then you can use a loop to loop through all of the objects. Search for "NSArray example" or "NSMutableArray example".

Share This Page