Code:
id *objects;
NSArray *listItems = [newStr componentsSeparatedByString:@" "];
NSUInteger count = [listItems count];
objects = malloc(sizeof(id *) * count);
[listItems getObjects:objects];
NSArray *listContent = [[NSArray alloc] initWithObjects:
[Product productWithType:objects[1] name:objects[0]],
[Product productWithType:objects[3] name:objects[2]],
[Product productWithType:objects[5] name:objects[4]],
[Product productWithType:objects[7] name:objects[6]], nil];
i want to create different name of objects[0], object[2],.....object[count]
count == 10000
i need to copy and paste it one by one or i can use some way to solve it,
ThXXX
Code:
NSArray *listContent = [[NSArray alloc] initWithObjects:
[Product productWithType:objects[1] name:objects[0]],
[Product productWithType:objects[3] name:objects[2]],
[Product productWithType:objects[5] name:objects[4]],
[Product productWithType:objects[7] name:objects[6]],
[Product productWithType:objects[9] name:objects[8]],
[Product productWithType:objects[11] name:objects[10]],
[Product productWithType:objects[13] name:objects[12]],
[Product productWithType:objects[15] name:objects[14]], ...........nil];
that mean i need to[Product productWithType
repeatedly, i just learn Xcode and i don't know the structure about it,
can someone help me