Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lynkynpark86

macrumors 6502
Original poster
I have an array with about 30 items. I also have a method that creates a file in a directory with the name based off a string. I need to repeat the method several times, once for each item of the array, until it's done. This is basically what is is (I realize createDirectory won't work, it's just to make the example shorter):
Code:
- (void)theMethod {

    createDirectoryWithTitle:%@;

}
How could I get that to work, once for each item in the array, loading the array item to the %@? Ideas? Please?
 

MorphingDragon

macrumors 603
Mar 27, 2009
5,160
6
The World Inbetween
I have an array with about 30 items. I also have a method that creates a file in a directory with the name based off a string. I need to repeat the method several times, once for each item of the array, until it's done. This is basically what is is (I realize createDirectory won't work, it's just to make the example shorter):
Code:
- (void)theMethod {

    createDirectoryWithTitle:%@;

}
How could I get that to work, once for each item in the array, loading the array item to the %@? Ideas? Please?

You need to go back and learn your programming basics if you don't know how to access each item in an array. You use a type of loop.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.