Add objects to NSMutableArray
- by iorf
I'm trying to add objects to NSMutableArray (categoriasArray), but its not done by the iterator:
@synthesize categoriasArray;
for (int i = 0; i < [categories count]; i++) {
categoria *cat = [[categoria alloc] initWithDictionary:[categories objectAtIndex:i]];
[self.categoriasArray addObject:cat];
cat=nil;
}
After the for iterator, categoriasArray has 0 objects.
Many thanks