I’m filling the NSMutableArray with some data as shown in below code
NSMutableArray *dates = [[NSMutableArray alloc] init];
Delivery *dm = [[Delivery alloc] init];
dm.str_Day = @"Monday";
dm.str_Date = @"05/02/2013";
dm.str_MNumber = @"MN255";
[dates addObject:dm];
Deliveryt *dm1 = [[Delivery alloc] init];
dm1.str_Day = @"Monday";
dm1.str_Date = @"05/02/2013";
dm1.str_MNumber = @"MN255";
[dates addObject:dm1];
and I want to display the above data in cellForRowAtIndexPath of tableview so how can I extract data from NSMutableArray?
There are two main parts to what you are trying to do:
make your
datesarray visible in the class withcellForRowAtIndexPath: it could be a property of that class, e.g., or it could belong to a Model class; a local variable will not do;assuming you decide to implement
datesas a property of your controller/data source, your could do something like this to retrieve the individual delivery elements: