I am developing an iPad application and for this application I have one function as below :-
-(void)testcurrentest:(NSMutableDictionary *)keydictionary{
NSArray *allKeys = [keydictionary allKeys];
if ([allKeys count] > 0) {
for(int i = 0;i< allKeys.count;i++){
[_currenies removeAllObjects];
NSString *product = [NSString stringWithFormat:@"%@", [keydictionary objectForKey:allKeys[i]]];
int kl = [productPriceSeasonCode intValue];
for(int i =0;i<kl;i++){
[_currenies addObject:@"0"];
}
NSLog(@"................%@",_currenies);
[_currencydictionary1 setObject:_currenies forKey:allKeys[i]];
NSLog(@"full dictionary...%@",_currencydictionary1);
}
}
}
Here, NSLog
print the currencies array based on the kl integer values but when I'm trying to set the NSMutableDictionary
the currencies but mutable array always show the latest array values.