I have this code
where I insert a double value in an array of arrays
double myDouble = [textField2.text doubleValue];
NSArray *temp = [[NSArray alloc]initWithObjects: textField1.text, [NSNumber numberWithDouble:myDouble], nil];
[appDelegate.extra addObject:temp];
after I do
NSString *cost = [NSString stringWithFormat: @"%.2f", [[appDelegate.extra objectAtIndex:0]objectAtIndex:1]];
[label1 setText:[[appDelegate.extra objectAtIndex:0]objectAtIndex:0]];
[label2 setText:cost];
then if I write “1” in textField2 I have “0.00” in label2….why???
Try: