I have an array with 5 sub arrays that I'm trying to loop through, I can access the first sub array and its objects but when I increase the variable count and try to access the second sub array my program crashes any ideas on a better way to do this? This is the my general method:
-(void) accessArray {
NSArray *myArray; // my array that holds sub arrays
int count = 0; //used to hold which sub array im accesing
NSArray *subArray = [myArray objectAtIndex:count];
//do something with object = [subArray objectAtIndex:0];
//do something with object = [subArray objectAtIndex:1];
}
-(void) otherMethod {
count ++
[self accessArray];
}