I have 2 Nsarray where objects of 2 arrays are same may be indexes of the object differs, but it should print both are equal irrespective of there indexes
NSArra
I found the solution,,we can achieve that by sorting the array elements
NSArray *arr1 = [[NSArray alloc]initWithObjects:@"a2223a",@"ab33b",@"a1acdf",@"ac23c45", nil];
NSArray *arr11 = [arr1 sortedArrayUsingSelector:@selector(localizedCompare:)];
NSArray *arr2 = [[NSArray alloc]initWithObjects:@"ab33b",@"ac23c45",@"a1acdf",@"a2223a", nil];
NSArray *arr22= [arr2 sortedArrayUsingSelector:@selector(localizedCompare:)];
if([arr11 isEqualToArray:arr22])
{
NSLog(@"equal");
}
else
{
NSLog(@"Not equal");
}