Sunday, 18 December 2011

Retreiving Multiple strings Saved in an array one by one-iPhone

// in view did load(See Previuos post for Saving)

amountSpend = [[NSMutableArray alloc]init];

NSArray *path1 = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory1 = [path1 objectAtIndex:0];

NSString *fullFileName2 = [NSString stringWithFormat:@"%@amountSpend", documentsDirectory1];
amountSpend=[[NSMutableArray alloc]initWithContentsOfFile:fullFileName2];


NSLog(@"amountSpend array%@",amountSpend);

//display the data where needed.

label.text = [amountSpend objectAtIndex:indexPath.row];

No comments:

Post a Comment