I have multiple mock databases within my iOS application that I am making. I need one of them to be able to have a mutable array within an already mutable array. Basically, I have what are called BlockParties and within those BlockParty Objects I need a list of Trucks as one of BlockParty’s attributes.
My code presently looks like this for initializing the mock database:
//Initialize the mock database of block parties.
listParty = [[NSArray alloc] initWithObjects:
[BlockParty blockpartyWithName:@"Westside Food Truck Central" listOfTrucks: nil latitude: [NSNumber numberWithDouble:200.1] longitude: [NSNumber numberWithDouble: 146.5] schedule:@"7/15/12" ],
[BlockParty blockpartyWithName:@"Venice Food Truck Paradise" listOfTrucks:nil latitude:nil longitude:nil schedule:nil],
nil];
selectedBlockParty = nil;
I need the listOfTrucks attribute to be where I can have a mutable array of multiple trucks for each BlockParty. Any ideas?
1 Answer