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
Just like rmaddy said, those NSArrays are not equal. Try this:
-(BOOL)compareArrayIgnoreIndexes:(NSArray*)arrayOne toArray:(NSArray*)arrayTwo{ NSSet *setOne=[[NSSet alloc]initWithArray:arrayOne]; NSSet *setTwo=[[NSSet alloc]initWithArray:arrayTwo]; return [setOne isEqualToSet:setTwo]; }