I have a array with objects A,B,A,A,B with keys 1,2,3,4,5
but as A is repeated NSDictionary is not taking 'A' 2 times and gives error saying
-[NSDictionary initWithObjects:forKeys:]: count of objects (1) differs from count of keys (0)'
So whats the solution for this
My Code:
Ar=[[NSArray alloc]initWithObjects:A,A,A,A,A,nil];
Ar2=[[NSArray alloc]initWithObjects:1,2,3,4,5,nil];
dic2=[[NSMutableDictionary alloc]initWithObjects:Ar forKeys:Ar2];