Quote:
Originally Posted by dsinc14
What do i need to fill in with my data.
- (int)getRandomNumber  int)from to  int)to {
return (int)from + arc4random() % (to-from+1);
}
|
I usually create a NSMutableArray in my .h file, like:
Code:
NSMutableArray *nameOfMyArray;
//below } of @interface in your .h file @property:
@property (nonatomic, retain) NSMutableArray *nameOfMyArray;
in your .m, first synthesize:
Code:
@synthesize nameOfMyArray;
//if you have a viewDidLoad method, allocate space for your array there and add the items:
nameOfMyArray = [[NSMutableArray alloc] initWithObjects:@"nameOfImage1Without_without.png", @"nameOfImage2Without.png", nil];
//don't forget to release your array inside the dealloc method:
- (void)dealloc {
[nameOfMyArray release];
[super dealloc];
}